Given a string s, return the longest substring of s that is a palindrome. If several have the same length, return the one that appears first.
Input: one line s.
Output: the longest palindromic substring.
babad
bab
"aba" is also valid, but "bab" appears first.
cbbd
bb
Run your code against the sample tests, or Submit to run the full suite.