2
acxz
bcxz
Funny
Not Funny

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