Can anyone help me with The Next Palindrome problem?

I don’t know why it is giving wrong answer. i tried it with many test cases but i still can’t point out the issue. Problem iink and my solution link are:

Thanks in advance.

Can you give this article a read first?

If this doesnt help, get back to us ^^



your output: 22H

correct output: 22