#K51982. Palindrome Checker

    ID: 29208 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

You are given a string S. Your task is to determine whether S is a palindrome. Before checking, remove all characters that are not alphanumeric and convert all letters to lowercase. In other words, let \( S' \) be given by:

\( S' = \text{lowercase}(\text{filter}(S)) \)

The string is a palindrome if \( S' \) is equal to its reverse. For example, if \( S = \texttt{A man a plan a canal Panama} \), then \( S' = \texttt{amanaplanacanalpanama} \) which is the same when reversed.

inputFormat

The input consists of a single line containing the string S. The string may include spaces, punctuation, and mixed case letters.

outputFormat

Output a single line: True if the string is a palindrome (after processing) or False otherwise.

## sample
A man a plan a canal Panama
True