2
acxz
bcxz
Funny
Not Funny

for _ in range(input()):
    s = raw_input()
    r = s[::-1]
    flg = True
    for i in range(1, len(s)):
        if abs(ord(s[i])-ord(s[i-1]))!=abs(ord(r[i])-ord(r[i-1])):
            flg = False
            break
    if flg:
        print 'Funny'
    else:
        print 'Not Funny'