THE NEXT PALINDROME ? very very large I/O ?

Problem Link- PALIN Problem - CodeChef . Please tell the approach to solve this question.
Here input number can be of 1000000 digits.