2
acxz
bcxz
Funny
Not Funny

T = int(raw_input())
for _ in range(T):
	s = raw_input()
	l = len(s)
	i = 0
	flag = 0
	j = l - 1
	while j >= i:
		if abs(ord(s[i]) - ord(s[i + 1])) != abs(ord(s[j]) - ord(s[j - 1])):
			flag = 1
			break
		i += 1
		j -= 1
		
	if flag:
		print "Not Funny"
	else:
		print "Funny"