My answer is correct but then also it's showing wrong answer

here is my code:-

please tell me what is the mistake I am doing.

ok, I got it now…
I was not adding the word which is not present in the trie…