#C11475. Mirrored Word Checker
Mirrored Word Checker
Mirrored Word Checker
You are given a string and your task is to determine whether it is a mirrored word. A mirrored word is defined as a word that reads the same backward as forward. Note that an empty string is considered a mirrored word.
Input Format: The first line contains a single integer T representing the number of test cases. Each of the following T lines contains one string for which you must determine if it is a mirrored word.
Output Format: For each test case, output a single line with the word "YES" if the string is mirrored, otherwise output "NO".
Note: All I/O operations must be performed using standard input (stdin) and standard output (stdout).
inputFormat
The input begins with an integer T (1 ≤ T ≤ 105) indicating the number of test cases. The next T lines each contain a single string s composed of lowercase letters.
Each string will not exceed 103 characters in length.
outputFormat
For each test case, print "YES" if the string is a mirrored word; otherwise, print "NO". Each answer should be on its own line.
## sample4
anna
hello
a
racecar
YES
NO
YES
YES
</p>