A palindrome is a string that, when reversed, is equal to itself. Example of the palindrome includes:
- 1001
- 333
- mom
- dad, etc.
You have to take a number as an input from the user. You have to find the next palindrome corresponding to that number. Your first input should be the number of test cases and then take all the cases as input from the user.