#include <iostream>
#include <string>
using namespace std;

char 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', '.', '?', '!', ' '}
};

string translate(string s) {
    if (s.length() % 2 == 1) {
        return "NA";
    }
    for (int i = 0; i < s.length(); i++) {
        if (i % 2 == 1 && !('1' <= s[i] && s[i] <= '5')) {
            return "NA";
        }
        if (!('1' <= s[i] && s[i] <= '6')) {
            return "NA";
        }
    }
    string ts;
    for (int i = 0; i < s.length(); i+=2) {
        int a = s[i]   - '0' - 1;
        int b = s[i+1] - '0' - 1;
        ts.push_back(table[a][b]);
    }
    return ts;
}

int main() {
    string s;
    while (cin >> s) {
        cout << translate(s) << endl;
    }
    return 0;
}