2
acxz
bcxz
Funny
Not Funny

def rev(string):
	return string[::-1]
 
t = int(raw_input())
for i in range(t):
	string = raw_input()
	rString = rev(string)
	x = len(string)
	flag  = 0
	for i in range(1, x):
		if abs(ord(string[i]) - ord(string[i-1])) != abs(ord(rString[i]) - ord(rString[i-1])):
			flag = 1
			break
	if flag == 0:
		print "Funny"
	else:
		print "Not Funny"