s = 'abcdefghijklmnopqrstuvwxyz.?! '
d = {}
for y in range(1, 7):
    for t in range(1, 6):
        d[(str(y),str(t))] = s[0]
        s = s[1:]

while True:
    try:
        line = raw_input()
        if len(line) == 0 or len(line) % 2 != 0:
            print 'NA'
            continue
        ans = ''
        for i in range(0, len(line), 2):
            if d[(line[i],line[i+1])]:
                ans += d[(line[i],line[i+1])]
            else:
                print 'NA'
                break
        else:
            print ans
    except EOFError:
        break