2
acxz
bcxz
Funny
Not Funny

for i in range(int(raw_input())):
	s = raw_input()
	rs = s[::-1]
	x = len(s)
	flag  = 0
	for i in range(1, x):
		if abs(ord(s[i]) - ord(s[i-1])) != abs(ord(rs[i]) - ord(rs[i-1])):
			flag = 1
			break
	if flag == 1:
		print "Not Funny"
	else:
		print "Funny"