import sys
d={}
L="abcdefghijklmnopqrstuvwxyz.?! "
p=0
for i in range(30): d[(i/5)*10+i%5+11]=L[i]
for s in sys.stdin:
  s=s[:-1]
  s=[s[i:i+2] for i in range(0,len(s),2)]
  try: A=[d[e] for e in map(int,s)]
  except: A=["NA"]
  print "".join(A)