2
acxz
bcxz
Funny
Not Funny

for _ in xrange(input()):
	s = raw_input()
	fl = True
	l = len(s)
	for i in xrange(1,l/2+1):
		if abs(ord(s[i]) - ord(s[i-1])) != abs(ord(s[l-i-1]) - ord(s[l-i])):
			fl = False
			break
	if fl:
		print 'Funny'
	else:
		print 'Not Funny'