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

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
def is_palindrome(input_string):
	i = 0
	j = len(input_string) - 1
	while i <= j:
		if input_string[i] == input_string[j]:
			i = i + 1
			j = j - 1
		else:
			return False
	return True



if __name__ == '__main__':
	cases = int(raw_input().strip())
	start = 1
	while start <= cases:
		input_string = raw_input().strip()
		if is_palindrome(input_string):
			print "YES"
		else:
			print "NO"

		start = start + 1