2
acxz
bcxz
Funny
Not Funny

inp = []
N = int(raw_input())
for i in range(N):
    inp.append(raw_input())
for j in inp:
    count = 0
    S = j
    R = S[::-1]
    for i in range(len(S)-1):
        if abs(ord(S[i]) - ord(S[i+1])) == abs(ord(R[i]) - ord(R[i+1])):
            count += 1
    if count == len(S)-1:
        print 'Funny'
    else:
        print 'Not Funny'