#C10266. Palindrome Checker

    ID: 39452 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

This problem asks you to determine whether a given string is a palindrome.

A string is a palindrome if, after removing all non-alphanumeric characters and ignoring cases, it reads the same forward and backward. For example, A man a plan a canal Panama is a palindrome, while 12345 is not.

Your task is to implement a solution that reads a single string from standard input and prints True if the string is a palindrome or False otherwise.

Note: When processing the string, all characters that are not letters or digits should be ignored and case differences should be disregarded. The checking can be mathematically expressed as:

$$ cleaned = \text{lowercase}(\text{removeNonAlnum}(s)) $$ $$ cleaned == \text{reverse}(cleaned) $$

inputFormat

The input consists of a single line containing the string s that needs to be checked.

Note that the input may contain spaces, punctuation, and numbers.

outputFormat

Output a single line: True if the string is a palindrome, or False otherwise.

## sample
A man a plan a canal Panama
True