#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

string res[6];

const char OFS = '1';
int main()
{
    res[0] = "abcde";
    res[1] = "fghij";
    res[2] = "klmno";
    res[3] = "pqrst";
    res[4] = "uvwxy";
    res[5] = "z.?! ";

    string s;
    while(getline(cin, s))
    {
        bool na = false;
        int l = s.size();
        if(l%2) na = true;
        s = s + "z";
        REP(l/2)
        {
            if(s[i * 2] >= '7' || s[i*2] == '0') na = true;
            if(s[i * 2 + 1] >= '6' || s[i*2] == '0') na = true;
        }

        if(na){ cout << "NA" << endl; continue;}
        
        int v, h;
        REP(l/2){
            v = (int)(s[i*2] - OFS);
            h = (int)(s[i*2 +1] - OFS);
            cout << res[v][h] ;
            //cout << res[(char)(s[i*2] - OFS)][(char)(s[i*2+1] - OFS)];
        
        }
        cout << endl;

    }
    return 0;
}