#K79007. Palindrome Game
Palindrome Game
Palindrome Game
Given an input string, determine if it is a palindrome. A string is considered a palindrome if, after converting all letters to lowercase and removing all non-alphanumeric characters, it reads the same forwards and backwards. The transformation can be expressed as: $$clean(s)= \text{lowercase}(\text{alphanumeric}(s))$$.
For each test case, output YES
if the string is a palindrome, otherwise output NO
.
inputFormat
The first line of the input contains an integer $$T$$ indicating the number of test cases. Each of the next $$T$$ lines contains a string $$s$$.
outputFormat
For each test case, output a single line with YES
if the string is a palindrome and NO
otherwise.## sample
5
A man a plan a canal Panama
No lemon no melon
Step on no pets
Hello World
RaceCar
YES
YES
YES
NO
YES
</p>