In this task you will be given a string and you should find the longest substring that is a palindrome. A palindrome is a string that is the same backwards as it is forwards. If the shortest possible palindrome is length 1 you should return the first character.

Input: Consider Input: nrnnngngnr

Output: ngngn


Input: Consider Input: hdhsdssshdsdd

Output: hdh


Input: Consider Input: xqxqqqqqqqxqqxx


Output: qxqqqqqqqxq