#C10744. Palindrome Checker

    ID: 39983 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

Given a string s, determine whether it is a palindrome. In this problem, you must ignore case differences and non-alphanumeric characters. For example, the string "A man, a plan, a canal, Panama!" is considered a palindrome.

The check is performed by first filtering out all characters that are not letters or digits, converting the remaining characters to lowercase, and then comparing the sequence with its reverse.

Note: An empty string is considered a palindrome.

inputFormat

The input consists of a single line containing the string s. The string may contain spaces, punctuation, digits, and letters, and its length is at most 10,000 characters.

outputFormat

Output a single line containing True if the processed string is a palindrome or False otherwise.

## sample
A man, a plan, a canal, Panama!
True