#C3763. Taco Palindrome Finder

    ID: 47226 Type: Default 1000ms 256MiB

Taco Palindrome Finder

Taco Palindrome Finder

You are given a list of strings. Your task is to identify all strings that are palindromes. A palindrome is a string that reads the same backward as forward after removing all non-alphanumeric characters and ignoring cases. For example, the string A Santa at NASA is considered a palindrome.

Note: The checking must be performed by ignoring spaces, punctuation, and case.

The input is provided through standard input (stdin) and the output should be printed to standard output (stdout). Make sure your solution complies with the input/output format described below.

inputFormat

The input begins with an integer N (1 ≤ N ≤ 105), representing the number of strings. This is followed by N lines, each containing a non-empty string. Each string may contain letters, digits, spaces, and punctuation.

outputFormat

For each of the N strings, if the string is a palindrome (according to the specified conditions), print that string on a new line in the order it appears in the input. If there are no palindromic strings, do not output anything.

## sample
4
racecar
hello
A Santa at NASA
No lemon, no melon
racecar

A Santa at NASA No lemon, no melon

</p>