Question---"Digital Dictionary"---wanted help regarding it

I am getting wrong answer on submitting code but my code is passing the sample input given.
link to my code is----https://ide.codingblocks.com/s/57543
I am not able to understand as to where am I going wrong in my approach.please help me out .
thanks in advance sir/ma’am.

Hi Nikhil, refer to the image above. For a given test case, the expected output is on the left side and your code’s output is on the right side. There are many differences between the two. Your code is not printing all the outputs.

hi @Khushboo, went through the testcase shown by you, but the word like “qvdb”, “qwg” is actually not added into dictionary, then why it is comming in suggestions list. Looks like testcase is wrong.