{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, \"Can you propose an efficient algorithm to find the length of the largest palindrome in a string?\"\r\u003cbr\u003e\r\u003cbr\u003eA string is said to be a palindrome if it reads the same both forwards and backwards, for example \"madam\" is a palindrome while \"acm\" is not.\r\u003cbr\u003e\r\u003cbr\u003eThe students recognized that this is a classical problem but couldn\u0027t come up with a solution better than iterating over all substrings and checking whether they are palindrome or not, obviously this algorithm is not efficient at all, after a while Andy raised his hand and said \"Okay, I\u0027ve a better algorithm\" and before he starts to explain his idea he stopped for a moment and then said \"Well, I\u0027ve an even better algorithm!\".\r\u003cbr\u003e\r\u003cbr\u003eIf you think you know Andy\u0027s final solution then prove it! Given a string of at most 1000000 characters find and print the length of the largest palindrome inside this string."}},{"title":"Input","value":{"format":"HTML","content":"Your program will be tested on at most 30 test cases, each test case is given as a string of at most 1000000 lowercase characters on a line by itself. The input is terminated by a line that starts with the string \"END\" (quotes for clarity).\r\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case in the input print the test case number and the length of the largest palindrome.\r\u003cbr\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\u003eabcbabcbabcba\r\nabacacbaaaab\r\nEND\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 13\r\nCase 2: 6\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}