for z in range(input()):
	s=raw_input()
	flag = True
	for a in range(len(s)+1):
		for b in range(a+1,len(s)+1):
			if (s[a:b])[::-1] not in s:
				flag = False
				break
	if flag:
		print 'YES'
	else:
		print 'NO'