2
acxz
bcxz
Funny
Not Funny

from math import *
n = input()
while n>0:
	s = raw_input()
	r = s[::-1]
	flag = 1
	i=0
	while i < len(s):
		if(abs(ord(s[i]) - ord(s[i-1])) != abs(ord(r[i]) - ord(r[i-1]))):
			flag = 0
			break
		i = i+1
	if flag == 1:
		print "Funny"
	else:
		print "Not Funny"
	n=n-1