#include <iostream>

using namespace std;

/*

  1 2 3 4 5 6

1 a f k p u z

2 b g l q v .

3 c h m r w ?

4 d i n s x !

5 e j o t y  

*/

char conv(string str) {

    int c=str[0]-'0'-1, v=str[1]-'0'-1;

    if (c<5) {

        return 'a'+5*c+v;

    } else if (c==5) {

        switch (v) {

            case 0:

                return 'z';

            case 1:

                return '.';

            case 2:

                return '?';

            case 3:

                return '!';

            case 4:

                return ' ';

        }

    } else {
        return '0';
    }

}

int main() {

    string mes;

    while (cin>>mes) {

        if (mes.length()%2!=0) cout << "NA" << endl;

        else {

            string temp="", res="";

            for (int i=0; i<mes.length(); i++) {

                if (i%2!=0) {

                    temp += mes[i];

                    char rchar = conv(temp);
                    if (rchar=='0') {
                        res = "NA";
                        break;
                    } else {
                        res += rchar;
                    }

                    temp = "";

                } else temp += mes[i];

            }

            cout << res << endl;

        }

    }

}