2
acxz
bcxz
Funny
Not Funny

noc = int(raw_input())
while noc:
    noc-=1
    ins = raw_input()
    l = len(ins)
    vals = []
    for i in range(1,len(ins)):
        vals.append(abs(ord(ins[i-1]) - ord(ins[i])))
       
    if vals == vals[::-1]:
        print "Funny"
    else:
        print "Not Funny"