P12687 [HackerEarth] saxie and strings
普及
题目描述

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

输入格式

见题面

输出格式

见题面

样例输入
2 aba ax SAMPLE
样例输出
YES NO