2
acxz
bcxz
Funny
Not Funny

from sys import stdin
import os

FUNNY_STR = 'Funny'
NOT_FUNNY_STR = 'Not Funny'


def reverse(str_to_reverse):
    i = len(str_to_reverse) - 1
    new_reversed_str = ''
    while i >= 0:
        new_reversed_str += str_to_reverse[i]
        i -= 1
    return new_reversed_str


def is_funny(test_str):
    i = 1
    reversed_test_str = reverse(test_str)
    while i < len(test_str):
        a = abs(ord(test_str[i]) - ord(test_str[i-1]))
        b = abs(ord(reversed_test_str[i]) - ord(reversed_test_str[i-1]))
        if a != b:
            return False
        i += 1
    return True


def is_funny_str(is_funny_bool):
    if is_funny_bool:
        return FUNNY_STR
    else:
        return NOT_FUNNY_STR


def main():
    line_list = [line.rstrip(os.linesep) for line in stdin.readlines()][1:]
    for line in line_list:
        print(is_funny_str(is_funny(line)))


if __name__ == '__main__':
    main()