2
acxz
bcxz
Funny
Not Funny

t = int(raw_input())

for _ in range(t):

	s = raw_input()
	r = s[::-1]
	flag = 0
	
	for i in range(1, len(s)):
		if abs(ord(s[i]) - ord(s[i - 1])) != abs(ord(r[i]) - ord(r[i - 1])):
			flag = 1
			break
		
	if flag == 0:
		print "Funny"
	else:
		print "Not Funny"