12061 - EECS_2018_MID1-1   

Description

Palindrome is a string that is identical to its reverse, like "level" or "aba". Given a string, find the longest palindrome in the string.

 

Input

The input consists of multiple lines. Each line contains a string.  The length of each string is less than 100.  The number of the test case is less than or equal to 70.

 

Output

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.

Each output should end with '\n'.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss