Digital Dictionary Prob using a Trie

Please find my code at https://ide.codingblocks.com/s/75557
It is passing all sample test cases
I have also taken care of Upper and Lower cases alphabets. Still it shows wring answer on Submission. Please help
Find the question here https://hack.codingblocks.com/contests/c/537/1560
I have also tried sorting the final vector https://ide.codingblocks.com/s/75555 but that did not help

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.