longest palindrome code