2
acxz
bcxz
Funny
Not Funny

T=input()
flag=0
for i in xrange(T):
    s=raw_input()
    r=s[::-1]
    for j in xrange(1,len(s)):
        if abs(ord(s[j])-ord(s[j-1]))!=abs(ord(r[j])-ord(r[j-1])):
            flag=0
            break
        else:
            flag=1
    if flag==1:
        print "Funny"
    else:
        print "Not Funny"