2
acxz
bcxz
Funny
Not Funny

try :
    N = int(raw_input())
except :
	N = 0

for x in range(0,N):
	S=raw_input()
	R=S[::-1]
	l=len(S)
	for i in range(1,l):
		x1 = abs(ord(S[i])-ord(S[i-1]))
		x2 = abs(ord(R[i])-ord(R[i-1]))
		if x1 != x2 :
			break
	if i+1==l:
		print 'Funny'
	else :
		print 'Not Funny'