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



namespace Test1 {

    class ClassMain {

        public static char[,] moji = new char[,] { 
        {'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','.','?','!',' '}};
       
        public static void Main(String[] args) {
            string line;

            while ((line = Console.ReadLine()) != null) {
                char[] chrs = line.ToCharArray();
                StringBuilder sb = new StringBuilder();
                if(chrs.Length%2==1){Console.WriteLine("NA");continue;}
                for (int i = 0; i < chrs.Length; i+=2) {
                    int x1 = chrs[i]-'0'-1;
                    int x2 = chrs[i+1]-'0'-1;
                    if (x1 < 0 || 5 < x1 || x2 < 0 || 4 < x2) { sb.Clear(); sb.Append("NA"); break; }
                    sb.Append(moji[x1,x2]);
                }

                Console.WriteLine(sb.ToString());

            }
        }


    }

}