2
acxz
bcxz
Funny
Not Funny

n=int(raw_input())
count=0

for i in range(n):
	strings=raw_input()
	f=0
	if len(strings) <2:
		print "Not Funny"
	else:
		reverse_s=strings[::-1]
		for s in range(1,len(strings)):
			check=abs(ord(strings[s])-ord(strings[s-1]))==abs(ord(reverse_s[s])-ord(reverse_s[s-1]))
			if check!=True:
				print "Not Funny"
				f=1	
				break
		if f!=1:
			print "Funny"