2
acxz
bcxz
Funny
Not Funny

for _ in xrange(input()):
    x=raw_input()
    x=list(x)
    r=x[::-1]

    for i in xrange(len(x)):
        x[i] = ord(x[i])
        r[i] = ord(r[i])

    
    ans=0
    for i in xrange(0,int(len(x)/2)+1):
        if(abs(x[i]-x[i+1])==abs(r[i]-r[i+1])):
            ans=1
        else:
            ans = 0
    if(ans):
        print "Funny"
    else:
        print "Not Funny"