using dp to get the longest Palindromes