## PALIN - The Next Palindrome

A positive integer is called a palindrome if its representation in the decimal system is the same when read from left to right and from right to left. For a given positive integer K of not more than 1000000 digits, write the value of the smallest palindrome larger than K to output. Numbers are always displayed without leading zeros.

### Input

The first line contains integer t, the number of test cases. Integers K are given in the next t lines.

### Output

For each K, output the smallest palindrome larger than K.

### Example

```Input:
2
808
2133

Output:
818
2222```

Warning: large Input/Output data, be careful with certain languages akash9827: 2018-01-06 05:32:10 I did this by reversing the number , i've checked corner cases too , all are correct. but then too i'm getting wrong answer. NOTE---->>> I've taken input as "unsigned long int", do i need to take input as a string and then do the processing?? mona_coder: 2017-12-28 11:56:16 integer K of not more than 1000000 digits; why it is showing wrong answer? pust_coder: 2017-12-28 11:04:14 what is wrong of this problem??please ans me,, #include using namespace std; int main() { unsigned long long int n,k,sum,m; int t,i,j,mod; cin>>t; for(i=0;i>n; for(j=0;j0) { mod=m%10; sum=sum*10+mod; m=m/10; } if(sum==k){ cout<