#K60942. Palindrome Checker

    ID: 31198 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

Given a string, determine whether it is a palindrome. A string is considered a palindrome if it reads the same backward as forward after removing all non-alphabetic characters and ignoring case differences. In other words, you should remove any punctuation, spaces, or special characters and then check if the resulting string is a palindrome.

Note: Use LaTeX format for any formulas. For example, to represent the reversal of a string \( s \), you could write \( s[::-1] \) (in Python style, where applicable).

Example:

  • Input: "A man, a plan, a canal, Panama"
  • Output: True

inputFormat

The input consists of a single line containing a string \( s \) with a maximum length of 1000 characters. The string may include spaces, punctuation, and mixed cases.

outputFormat

Output a single line: either True if the processed string is a palindrome, or False otherwise. The output should exactly match these strings.

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