using System;
using System.Text;

class Program {
    static void Main() {
        for (string line; !string.IsNullOrEmpty(line = Console.ReadLine());) {
            var length = line.Length;

            if (length % 2 != 0) {
                Console.WriteLine("NA");
                continue;
            }

            var result = new StringBuilder(length / 2);

            for (int i = 0; i < length; i += 2) {
                var ch = Convert(line[i], line[i + 1]);

                if (ch == char.MinValue) {
                    result.Clear().Append("NA");
                    break;
                }

                result.Append(ch);
            }

            Console.WriteLine(result.ToString());
        }
    }

    static char[,] charTable = {
        { 'a', 'b', 'c', 'd', 'e' },
        { 'f', 'g', 'h', 'i', 'j' },
        { 'k', 'l', 'm', 'n', 'o' },
        { 'p', 'q', 'r', 's', 't' },
        { 'u', 'v', 'w', 'x', 'y' },
        { 'z', '.', '?', '!', ' ' },
    };

    static char Convert(char v1, char v2) {
        int i, j;
        if (!int.TryParse(v1.ToString(), out i) || !int.TryParse(v2.ToString(), out j) ||
            i < 1 || i > 6 || j < 1 || j > 5
        ) {
            return char.MinValue;
        }

        return charTable[i - 1, j - 1];
    }
}