{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eA \u003ci\u003eword\u003c/i\u003e is the nonempty sequence of symbols \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003ea\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003ea\u003csub\u003en\u003c/sub\u003e\u003c/i\u003e. A \u003ci\u003epalindrome\u003c/i\u003e is the word \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003ea\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003ea\u003csub\u003en\u003c/sub\u003e\u003c/i\u003e that is read from the left to the right and from the right to the left the same way (\u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003ea\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003ea\u003csub\u003en\u003c/sub\u003e\u003c/i\u003e \u003d \u003ci\u003ea\u003csub\u003en\u003c/sub\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e−1\u003c/sub\u003e…\u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e). If \r\n\u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e \u003d \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003ea\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003ea\u003csub\u003en\u003c/sub\u003e\u003c/i\u003e and \r\n\u003ci\u003eS\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e \u003d \u003ci\u003eb\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003eb\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003eb\u003csub\u003em\u003c/sub\u003e\u003c/i\u003e, then \u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003eS\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e \u003d \r\n\u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003ea\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003ea\u003csub\u003en\u003c/sub\u003e\u003c/i\u003e\u003ci\u003eb\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003eb\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e…\u003ci\u003eb\u003csub\u003em\u003c/sub\u003e\u003c/i\u003e. The input contains some word \u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e. You are to find a nonempty word \u003ci\u003eS\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e of the minimal length that \u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003eS\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e is a palindrome.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first input line contains \u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e (it may consist only of the Latin letters). It’s guaranteed that the length of \u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e doesn’t exceed 10000 symbols.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003e\u003ci\u003eS\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e\u003ci\u003eS\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eNo\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNoN\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eOnLine\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eOnLineniLnO\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eAbabaAab\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eAbabaAababA\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}