2
acxz
bcxz
Funny
Not Funny

#he_play_with_strings.py

import string
d = {}

for i in string.ascii_lowercase:
	d[i] = ord(i)

for i in range(input()):
	flag = 0
	word = raw_input()
	rword = word[::-1]
	for i in xrange(1,len(word)):
		if abs(d[word[i]] - d[word[i-1]]) != abs(d[rword[i]]-d[rword[i-1]]):
			flag = 1
			break
	if flag:
		print "Not Funny"
	else:
		print "Funny"