2
acxz
bcxz
Funny
Not Funny

n=input()
for i in range(n):
	st=raw_input()
	flag=True
	sti=st[::-1]
	for j in range(1,len(st)):
		if abs(ord(st[j])-ord(st[j-1]))!=abs(ord(sti[j])-ord(sti[j-1])):
			flag=False
			break
	if flag:
		print "Funny"
	else:
		print "Not Funny"