2
acxz
bcxz
Funny
Not Funny

def funnyornot(string):
	rev = string[::-1]
	for i in range(len(string)/2):
		if abs(ord(string[i+1]) - ord(string[i])) != abs(ord(rev[i+1]) - ord(rev[i])):
			return "Not Funny"
	return "Funny"
#	return rev
inp = int(raw_input())
for i in range(inp):
	print funnyornot(raw_input())