1mg interview question

String and dictionary based easy question