A palindrome is "a word, phrase, or sequence that reads the same backward as forward." Below are some example palindromes:
- madam
- racecar
- tat
Can you write a python function that takes in a string and outputs the longest palindrome? If the string itself is a palindrome, the function would output the original string.