for _ in range(int(input())):
    s = input()
    a = [ord(x) for x in s]
    l = len(a)
    for i in range(l // 2):
        if abs(a[i] - a[i + 1]) != abs(a[-i - 1] - a[-i - 2]):
            print('Not Funny')
            break
    else:
        print('Funny')

66a96df401be57191e783741072fffe4f1f9639a
<mask token>

for _ in range(int(input())):
    s = input()
    a = [ord(x) for x in s]
    l = len(a)
    for i in range(l // 2):
        if abs(a[i] - a[i + 1]) != abs(a[-i - 1] - a[-i - 2]):
            print('Not Funny')
            break
    else:
        print('Funny')
