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
'''
cases = int(raw_input())

for case in xrange(0,cases):
	
	s = raw_input()
	
	r = s[::-1]
	c = False
	for i in xrange(1,len(s)):
		if not (abs((ord(s[i]) - ord(s[i-1]))) == abs((ord(r[i]) - ord(r[i-1])))) :
			print "Not Funny"
			c = True
			break
			
	if not c:
		print "Funny"