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
'''
import math
t = input()
while(t > 0):
	s = raw_input()
	r = ''.join(reversed(s))
	fun = True
	for i in range(1,len(s)):
		if not abs(ord(s[i]) - ord(s[i-1])) == abs(ord(r[i]) - ord(r[i-1])):
			fun = False
	if fun:
		print "Funny"
	else:
		print "Not Funny"
	t -= 1