Optimized Palindrome