2
acxz
bcxz
Funny
Not Funny

t = input()
for i in range(t):
	fwd = raw_input()
	rev = fwd[::-1]
	check = True
	length = len(fwd)
	for i in range(length-1):
		d1 =  abs(ord(fwd[i+1]) - ord(fwd[i]))
		d2 = abs(ord(rev[i+1]) - ord(rev[i]))
		#print d1,d2,fwd[i+1],fwd[i],rev[i+1],rev[i]
		if d1!=d2:
			check= False
			break
	if check:
		print 'Funny'
	else:
		print 'Not Funny'