Given a string . Find the longest substring in that is a palindrome.
The input contains a string (1 \leq |S| \leq 1000) consisting of uppercase Latin letters.
Output a palindromic substring of of maximal length. If there are multiple answers, output the substring that appears first in .
Example 1
Example 2