2
acxz
bcxz
Funny
Not Funny

for _ in xrange(input()):
	s=raw_input()
	
	l=len(s)
	flag=0
	for i in xrange(l/2):
		
		if abs(ord(s[i])-ord(s[i+1])) != abs(ord(s[l-i-1])-ord(s[l-i-2])):
			flag=1
			break
	if flag==0:
		print "Funny"
	else:
		print "Not Funny"