{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"\u003cp align\u003djustify\u003e\r\nA positive integer is called a \u003ci\u003epalindrome\u003c/i\u003e 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.\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp align\u003djustify\u003e\r\nThe first line contains integer t, the number of test cases. Followed by t lines containing integers K.\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp align\u003djustify\u003e\r\nFor each K, output the smallest palindrome larger than K.\r\n\u003c/p\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\r\n\u003cp\u003e\r\n\u003ctt\u003e\u003cb\u003eInput:\u003c/b\u003e\u003c/tt\u003e\u003cbr\u003e\r\n2\u003cbr\u003e\r\n808\u003cbr\u003e\r\n2133\u003cbr\u003e\r\n\u003c/p\u003e\r\n\u003cp\u003e\r\n\u003ctt\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/tt\u003e\u003cbr\u003e\r\n818\u003cbr\u003e\r\n2222\u003cbr\u003e\r\n\u003c/p\u003e\r\n\u003cb\u003eWarning: large Input/Output data, be careful with certain languages\u003c/b\u003e"}}]}