Remove from the given line the least number of characters to get a palindrome (the string that reads the same from right to left and from left to right).
Nonempty string of length no more than 100 symbols. The string contains only uppercase Latin letters.
Print the palindrome of maximum length that can be obtained from the given line by deleting some of its letters. If several solutions exist, print one (any) of them.