🏡 index : github.com/captn3m0/codechef.git

---
{"languages_supported":{"0":"NA"},"title":"PALIN","category":"NA","old_version":true,"problem_code":"PALIN","tags":{"0":"NA"},"layout":"problem"}
---

<h3> All submissions for this problem are available. </h3>
<p align=justify>
A positive integer is called a <i>palindrome</i> 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.</p>
<h3>Input</h3>
<p align=justify>
The first line contains integer t, the number of test cases. Followed by t lines containing integers K.</p>
<h3>Output</h3>
<p align=justify>
For each K, output the smallest palindrome larger than K.
</p>
<h3>Example</h3>
<p>
<tt><b>Input:</b></tt><br /><br />
2<br /><br />
808<br /><br />
2133<br />
</p>
<p>
<tt><b>Output:</b></tt><br /><br />
818<br /><br />
2222<br />
</p>
<p><b>Warning: large Input/Output data, be careful with certain languages</b></p>