2
acxz
bcxz
Funny
Not Funny

def stri(s):
	r = s[::-1]
	s = map(ord,list(s))
	r = map(ord,list(r))
	for i in xrange(1,len(s)):
		if abs(s[i]-s[i-1])!=abs(r[i]-r[i-1]):
			return "Not Funny"
	return "Funny"
	
for t in xrange(int(raw_input())):
	s = raw_input()
	print stri(s)