Rewrite ValidPalindrome