#C13771. Alphanumeric Palindrome Checker

    ID: 43346 Type: Default 1000ms 256MiB

Alphanumeric Palindrome Checker

Alphanumeric Palindrome Checker

Given a string S, determine whether it is a palindrome, considering only alphanumeric characters and ignoring cases. In other words, the string is a palindrome if it reads the same forward and backward after removing all non-alphanumeric characters and converting all letters to the same case.

Mathematically, a string S of length n is a palindrome if for every index \(i\) (where \(0 \le i < n\)), the following holds:

S[i]=S[n1i]S[i] = S[n-1-i]

For example, the string "A man, a plan, a canal, Panama" is a palindrome.

inputFormat

The input consists of a single line containing a string S. The string may include spaces, punctuation, and other non-alphanumeric characters.

outputFormat

Output a single line: either True if the string is a palindrome; otherwise, output False.

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