Palindrome is a string that is identical to its reverse, like "level" or "aba". Given a string, find the longest palindrome in the string.
The input consists of multiple lines. Each line contains a string. The length of each string is less than 1000.
In each test case, output the longest palindrome in the string. If there are many palindromes of the same length, output the first one in the string.