Saxie is a programming enthusiast. He has always been amazed by the beauty of strings. He always dreams of going to Byteland and playing with strings. One day he had a nightmare that Dr. Evil had attacked the strings. When he came forward to protect the strings, Dr. Evil asked him if every substring of S has its reverse in the string. Dr. Evil promised him that he will leave Byteland forever if Saxie answers his question. Your task is to help Saxie in saving Byteland.

Input:

First line of the input contains T, the number of test cases. The next T lines contain a string each.

Output:

For each string S Print "YES" if every substring of S has its reverse in the string else print "NO".

Constraints:

1 ≤ T ≤ 10000
1 ≤ |S| ≤ 100

S contains only lower-case characters.

SAMPLE INPUT
2
aba
ax

SAMPLE OUTPUT
YES
NO
for _ in xrange(input()):
	s=raw_input()
	if s==s[::-1]:
		print "YES"
	else:
		print "NO"