Find the longest palindromic substring. If several have the same length, return the leftmost one.
Input: one string (no spaces). Output: the substring.
Your program reads from stdin and prints to stdout.
Example 1
Input: babad
Output: bab
Hints