#K80707. Palindrome Checker

    ID: 35590 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

In this problem, you are given a string that may include punctuation, spaces, and mixed case letters. Your task is to determine whether the string is a palindrome by ignoring all non-alphanumeric characters and case differences.

A string is considered a palindrome if it reads the same forward and backward after removing all symbols and converting all letters to the same case.

For example, the string "A man, a plan, a canal, Panama!" should be evaluated as a palindrome.

You may find the following useful transformation using LaTeX notation: if \( s \) is your string, let \( s' = \text{lower}(\text{alnum}(s)) \), then the condition for a palindrome is \( s' = (s')^R \), where \( (s')^R \) is the reverse of \( s' \).

inputFormat

The input is provided via standard input (stdin) as a single string which may contain spaces, punctuation, and mixed case letters.

For example:

A man, a plan, a canal, Panama!

outputFormat

The output should be a single line to standard output (stdout), printing either "True" if the input string is a palindrome after normalization, or "False" otherwise.

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