import itertools
dic={"61":"z","62":".","63":"?","64":"!","65":" "}
cnt=ord("a")
for i in itertools.product(range(1,6),repeat=2):
    dic["".join(map(str,i))]=chr(cnt)
    cnt+=1

while True:
    try:
        s=raw_input()
    except EOFError:
        break
    if len(s)%2!=0:
        print "NA"
    else:
        try:
            print "".join(dic[s[i:i+2]] for i in range(0,len(s),2))
        except KeyError:
            print "NA"