#include <iostream>
#include <string>
using namespace std;
int main() {
    int tbl[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', '.', '?', '!', ' '}
    };

    string code;
    while (cin >> code) {
        string converted = "";

        if (code.size() % 2 != 0) {
            converted = "NA";
        } else {
            for (int i=0; i<(int)code.size(); i+=2) {
                int a = code[i] - '0';
                int b = code[i+1] - '0';
                if (a >= 1 && a <= 6 && b >= 1 && b <= 5) {
                    converted += tbl[a-1][b-1];
                } else {
                    converted = "NA";
                    break;
                }
            }
        }

        cout << converted << endl;
    }
    return 0;
}