- Time limit: 1.00 s
- Memory limit: 512 MB
You are given a string. Find it's longest palindromic substring.
Input
The only input line contains a string of length . Each character is one of a–z.
Output
Print the longest palindrome in the string. If there are several solutions, you may print any of them.
Constraints
Example 1
Input:
aybabtu
Output:
bab
Example 2
Input:
asdfsaippuakauppiasasdf
Output:
saippuakauppias