Doubt in Digital Dictionary

I am only able to pass the first 3 test cases while 2 other shows the wrong answer.
I have dry run many times on many inputs.
Can someone help?
https://ide.codingblocks.com/s/653495