2
acxz
bcxz
Funny
Not Funny

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