#C13796. Palindromic Words Finder
Palindromic Words Finder
Palindromic Words Finder
You are given a list of strings. Your task is to identify and print those strings which are palindromic when considering only alphanumeric characters and ignoring case. A palindromic word reads the same forwards and backwards after removing punctuation, spaces, and other non-alphanumeric characters.
For example, "A man, a plan, a canal, Panama!" is a palindrome because, after removing non-alphanumeric characters and normalizing the case, it reads the same backward as forward.
If no palindromic words are found, you should output nothing.
Note: An empty string should not be considered a valid palindrome.
inputFormat
The first line of input contains a single integer n (1 ≤ n ≤ 105) which indicates the number of strings. Each of the following n lines contains a non-empty string. The strings may include spaces, punctuation, and other non-alphanumeric characters.
outputFormat
For each input string that is a palindrome based on the criteria (ignoring non-alphanumeric characters and case), print the original string on a new line. If none of the strings is a palindrome, do not print anything.
## sample6
Level
world
madam
Hello!
12321
A man, a plan, a canal, Panama!
Level
madam
12321
A man, a plan, a canal, Panama!
</p>