2
acxz
bcxz
Funny
Not Funny

noOfStr = raw_input()
for i in range(int(noOfStr)):
	string = raw_input()
	for i in range(1,len(string)):
	    if abs(ord(string[i])-ord(string[i-1])) == abs(ord(string[-1-i])-ord(string[-i])):
	        continue
	    else:
	        break
	print 'Funny' if i==len(string)-1 else 'Not Funny'