#include <bits/stdc++.h>
using namespace std;
int main(void){
    std::deque<string> deq;
    string s;
    while (cin>>s) {
        if (s.size()%2!=0) {
            cout<<"NA"<<endl;
        } else {
            int i=0;
            while (i<=s.size()-2) {
                string tmp=s.substr(i,2);
                i+=2;
                if (tmp=="11") {
                    deq.emplace_back("a");
                } else if (tmp=="12") {
                    deq.emplace_back("b");
                } else if (tmp=="13") {
                    deq.emplace_back("c");
                } else if (tmp=="14") {
                    deq.emplace_back("d");
                } else if (tmp=="15") {
                    deq.emplace_back("e");
                } else if (tmp=="21") {
                    deq.emplace_back("f");
                } else if (tmp=="22") {
                    deq.emplace_back("g");
                } else if (tmp=="23") {
                    deq.emplace_back("h");
                } else if (tmp=="24") {
                    deq.emplace_back("i");
                } else if (tmp=="25") {
                    deq.emplace_back("j");
                } else if (tmp=="31") {
                    deq.emplace_back("k");
                } else if (tmp=="32") {
                    deq.emplace_back("l");
                } else if (tmp=="33") {
                    deq.emplace_back("m");
                } else if (tmp=="34") {
                    deq.emplace_back("n");
                } else if (tmp=="35") {
                    deq.emplace_back("o");
                } else if (tmp=="41") {
                    deq.emplace_back("p");
                } else if (tmp=="42") {
                    deq.emplace_back("q");
                } else if (tmp=="43") {
                    deq.emplace_back("r");
                } else if (tmp=="44") {
                    deq.emplace_back("s");
                } else if (tmp=="45") {
                    deq.emplace_back("t");
                } else if (tmp=="51") {
                    deq.emplace_back("u");
                } else if (tmp=="52") {
                    deq.emplace_back("v");
                } else if (tmp=="53") {
                    deq.emplace_back("w");
                } else if (tmp=="54") {
                    deq.emplace_back("x");
                } else if (tmp=="55") {
                    deq.emplace_back("y");
                } else if (tmp=="61") {
                    deq.emplace_back("z");
                } else if (tmp=="62") {
                    deq.emplace_back(".");
                } else if (tmp=="63") {
                    deq.emplace_back("?");
                } else if (tmp=="64") {
                    deq.emplace_back("!");
                } else if (tmp=="65") {
                    deq.emplace_back(" ");
                } else {
                    cout<<"NA"<<endl;
                    deq.clear();
                    break;
                }
            }
            if (deq.size()!=0) {
                for (int i=0;i<deq.size();i++) {
                    cout<<deq[i];
                }
                cout<<endl;
            }
            deq.clear();
        }
    }
}



Measured memory_bytes: 3176