'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''

test_count = raw_input()

for i in range(int(test_count)):
	string = raw_input()
	string_len = len(string)
	
	is_palindrome = "YES"
	
	for i in range(string_len / 2 + 1):
		if not string[i] == string[string_len - i - 1]:
			is_palindrome = "NO" 

	print is_palindrome