Need help in password cracker

I am solving a recursion problem on hacker rank. Problem name is PASSWORD CRACKER.
I am trying since 4-5 hours but unable to find mistake in my code.

Problem: Password Cracker | HackerRank
my solution link: Online Compiler and IDE - GeeksforGeeks

Please help me to find the mistake.
My code is giving wrong answer from testcases 19 to 35.

Thanks in advance.