2
acxz
bcxz
Funny
Not Funny

import math
for t in range(input()):
 s=raw_input()
 rev=s[::-1]
 flag=1
 l=len(s)
 for i in range(l-1):
  if abs(ord(s[i+1])-ord(s[i]))!=abs(ord(rev[i+1])-ord(rev[i])):
   flag=0
   break
 if flag==1:
  print "Funny"
 else:
  print "Not Funny"