Find the largest palindromic substring in a given string. Implement longest_palindrome(s) to return the longest contiguous substring that reads identically forward and backward. If multiple substrings have the same maximum length, return the leftmost one. The input is a string, and the output is a string.
def longest_palindrome(s):