2
acxz
bcxz
Funny
Not Funny

for i in range(input()):
	a,ans= raw_input(),0
	b=a[::-1]
	for i in range(1,len(a)):
		if abs(ord(a[i])-ord(a[i-1])) != abs(ord(b[i])-ord(b[i-1])): ans+=1
	if ans >1:
		print "Not Funny "
	else:
		print "Funny"