using System;
using System.Collections.Generic;
using System.Linq;

class PaizaSample
{
   
    static void Main()
    {

        string input;
        while ((input = Console.ReadLine()) != null)
        {
            if (input.Length % 2 != 0)
            {
                Console.WriteLine("NA");
                continue;
            }

            char[] ar = {'.', '?', '!', ' '};

            bool flag = true;
            string output = "";
            for (int i = 0; i < input.Length; i += 2)
            {
                int col = int.Parse(input[i].ToString());
                int row = int.Parse(input[i+1].ToString());
               
                if (row <= 5 && col <= 6)
                {
                    if (col == 6 && row >= 2)
                    {
                        output += ar[row - 2];
                    }
                    else
                    {
                        char c = (char)(97 + (col - 1) * 5 + (row - 1));
                        output += c.ToString();
                    }
                }
                else
                {
                    Console.WriteLine("NA");
                    flag = false;
                    break;
                }
            }

            if (flag)
            {
                Console.WriteLine(output);
            }
        }
        

       // Console.ReadKey();

    }
}