t=input()
while(t>0):
    t=t-1
    s=raw_input()
    r=s[::-1]
    if r == s :
        print "YES"
    else:
        print "NO"
a2177f35916e534129ee3e2072bd6d3a4203d1f0
t=input()
while(t>0):
    t=t-1
    s=raw_input()
    r=s[::-1]
    if r == s :
        print "YES"
    else:
        print "NO"