2
acxz
bcxz
Funny
Not Funny

c = int(raw_input())
for i in range(c):
	ip = raw_input()
	l = len(ip)
	j = 0
	while j < l - 2:
		if abs(ord(ip[j]) - ord(ip[j+1])) != abs(ord(ip[l-1-j]) - ord(ip[l-1-j-1])):
			print "Not Funny"
			break	
		j = j + 1
	if j == l-2 :
		print "Funny"