#C14986. Valid Palindrome Check

    ID: 44695 Type: Default 1000ms 256MiB

Valid Palindrome Check

Valid Palindrome Check

Given a string S, your task is to determine whether S is a palindrome when considering only its alphanumeric characters and ignoring cases.

In other words, after filtering out non-alphanumeric characters, the string should read the same forward and backward.

The condition can be represented mathematically as follows:

\( \text{Filtered}(S) = \text{reverse}(\text{Filtered}(S)) \)

where \( \text{Filtered}(S) \) is the string after removing non-alphanumeric characters and converting all letters to lowercase.

inputFormat

The input consists of a single string S which may contain spaces, punctuation, and other symbols. Read the string from standard input (stdin).

outputFormat

Output either True or False to standard output (stdout) indicating whether the string is a valid palindrome under the given constraints.

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