2
acxz
bcxz
Funny
Not Funny

t = int(raw_input())
while t:
    t-=1
    a = str(raw_input())
    no = True
    l = len(a)
    for i in xrange(1, (l+1)/2):
        if abs(ord(a[i]) - ord(a[i-1])) != abs(ord(a[l-i]) - ord(a[l-1-i])):
            print 'Not Funny'
            no = False
            break
    if no == True:
        print 'Funny'