#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <functional>
#include <algorithm>
#include <cctype>
using namespace std;

typedef long long ll;

string table[6][5] = {
    {"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", ".", "?", "!", " "}
};

int main()
{
    string str;
    while(cin >> str) {
        if(str.size() % 2 == 1) {
            cout << "NA" << endl;
            continue;
        }

        bool ok = true;
        string ret = "";
        int a, b;
        for(int i = 0; i < str.size(); i++) {
            if(!isdigit(str[i])) {
                ok = false;
                break;
            }
            if(i % 2 == 0) {
                a = str[i] - '1';
            } else {
                b = str[i] - '1';
                if(a < 0 || a >= 6 || b < 0 || b >= 5) {
                    ok = false;
                    break;
                }
                ret += table[a][b];
            }
        }
            if(ok) {
                cout << ret << endl;
            } else {
                cout << "NA" << endl;
            }
    }
}