2
acxz
bcxz
Funny
Not Funny

t=input()
while t:
    t-=1
    s=raw_input()
    r=s[::-1]
    i=1
    while i<len(s):
        x=ord(s[i])-ord(s[i-1])
        y=ord(r[i])-ord(r[i-1])
        if abs(x)==abs(y):
            i+=1
        else:
            i=len(s)+1
    if i==len(s):
        print "Funny"
    else:
        print "Not Funny"