2
acxz
bcxz
Funny
Not Funny

import math
t=int(raw_input())
for i in range(t):
    st=raw_input()
    rst="".join(reversed(st))
    l=len(st)
    j=1

    while j<l:
        if abs(ord(st[j])-ord(st[j-1]))!= abs(ord(rst[j])-ord(rst[j-1])):
            print ("Not Funny");
            break
        elif j==l-1:
            print("Funny");
            
        j+=1