Another solution for problem longest palindrome