THE NEXT PALINDROME ? very very large I/O ?

Problem Link- https://www.codechef.com/problems/PALIN . Please tell the approach to solve this question.
Here input number can be of 1000000 digits.