2
acxz
bcxz
Funny
Not Funny

for i in range(int(raw_input())):
	a=raw_input()
	n=len(a)
	flag=0
	for i in range((n+1)/2):
		if(abs(ord(a[i+1])-ord(a[i])) != abs(ord(a[n-i-2])-ord(a[n-i-1]))):
			print "Not Funny"
			flag=1
			break
	if(not flag):
		print "Funny"