A program that receives N string data and outputs YES when reading from the front or from the back (pale string) and outputs NO unless it is a palindromic string is written.
It is not case sensitive when examining a single sentence.
The integer N (1<=N<=20) is given in the first line, and N words are entered from the next line. The length of each word does not exceed 100.
Output the result of the string as YES or NO for each line.
5
level
moon
abcba
soon
gooG
#1 YES
#2 NO
#3 YES
#4 NO
#5 YES
n = int(input())
for i in range (n):
word = input()
size = len(word)
# Slicing
if word == word[::-1]:
print ("#%d YES" %(i+1))
else:
print ("#%d NO" %(i+1))
'''
# Letter Check
for j in range (size // 2):
if word[j] != word[-1-j]:
print ("#%d NO" %(i+1))
break
else:
print ("#%d YES" %(i+1))
'''