2
acxz
bcxz
Funny
Not Funny

'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
n=int(raw_input())
for j in range(0,n):
	s=raw_input()
	d=0
	r=s[::-1]
	for i in range(1,len(s)):
		if (abs(ord(s[i])-ord(s[i-1]))!=abs(ord(r[i])-ord(r[i-1]))):
			d+=1
			break
	if(d>0):
		print "Not Funny"
	else:
		print "Funny"