{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left.\u003c/p\u003e\n\n\u003cp\u003eThere\u0027re a string \u003cvar\u003es\u003c/var\u003e and an operation defined on the string.\n\u003c/p\u003e\u003col\u003e\n \u003cli\u003echoose two integer \u003cvar\u003ei\u003c/var\u003e and \u003cvar\u003ej\u003c/var\u003e (1 ≤ \u003cvar\u003ei\u003c/var\u003e, \u003cvar\u003ej\u003c/var\u003e ≤ |\u003cvar\u003es\u003c/var\u003e|).\u003c/li\u003e\n \u003cli\u003eswap \u003cvar\u003es\u003c/var\u003e\u003csub\u003e\u003cvar\u003ei\u003c/var\u003e\u003c/sub\u003e and \u003cvar\u003es\u003c/var\u003e\u003csub\u003e\u003cvar\u003ej\u003c/var\u003e\u003c/sub\u003e.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003c/p\u003e\n\n\u003cp\u003eYou are given the string, and you can perform the operation once. Please find the longest palindromic substring of string after you perform the operation.\u003c/p\u003e\n\n\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003eInput will consist of multiple test cases. Each test case contains exactly one line, which gives a non-empty string consisting of lowercase and uppercase letters. The length of the string will not be greater than 10\u003csup\u003e5\u003c/sup\u003e.\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003eFor each test case, print a line containing the test case number (beginning with 1) followed by the length of the longest palindrome.\u003c/p\u003e\n\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\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\u003eaaabbacaa\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 8\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n\u003ch4\u003eHint\u003c/h4\u003e\n\u003cp\u003eThe longest palindrom of string \"aaabbacaa\" is \"abba\". If we exchange the \u0027a\u0027 and \u0027c\u0027, we will get \"aaabbaaac\". The longest palindrom is \"aaabbaaa\".\u003c/p\u003e\n"}}]}