Given a string input_string, return the longest contiguous substring of input_string that is a palindrome. If there are multiple substrings of maximum length, return any one of them.
Example 1
Input: "abacdfgdcaba"
Output: "aba"
Explanation: The longest palindromic substring is "aba" at the start and end. Either is valid.
Example 2
Input: "xyzzyxabc"
Output: "xyzzyx"
Explanation: The longest palindromic substring is "xyzzyx".
Example 3
Input: "12321abcd"
Output: "12321"
Explanation: The longest palindromic substring is "12321".
Constraints
Case 1
Input: "racecarxyz"
Expected: "racecar"
Case 2
Input: "abcdedcba"
Expected: "abcdedcba"
Case 3
Input: "aabbccdd"
Expected: "aa"
Case 4
Input: "noonmadam"
Expected: "noon"
Case 5
Input: "abcbaabcbabcba"
Expected: "abcbaabcbabcba"