2
acxz
bcxz
Funny
Not Funny

t=int(input())
for tcase in range(t):
	a=raw_input()
	k=a[::-1]
	flag=1
	for i in range(len(a)-1):
		if(abs(ord(a[i])-ord(a[i+1]))!=abs(ord(k[i])-ord(k[i+1]))):
			flag=0
	if(flag==0):
		print("Not Funny")
	else:
		print("Funny")