2
acxz
bcxz
Funny
Not Funny

for _ in range(int(input())):
    s = raw_input().strip()
    # print(s)
    r = s[::-1]
    # print(r)
    flag = 0
    for i in range(1, len(s)):
        if abs(ord(s[i]) - ord(s[i-1])) != abs(ord(r[i]) - ord(r[i-1])):
            flag = 1
    if flag:
        print ("Not Funny")
    else:
        print ("Funny")