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

while t:
	t-=1
	
	s = raw_input().strip()
	
	r = s[::-1]
	flag = 0
	for i in range(1, len(s)):
		if abs(ord(s[i]) - ord(s[i-1])) != abs(ord(r[i]) - ord(r[i-1])):
			flag = 1
	if flag:
		print "Not Funny"
	else:
		print "Funny"