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

int main() {
    string line;
    while (cin >> line) {
        if (line.size() % 2 != 0) {
            cout << "NA" << endl;
            continue;
        }
        string result;
        while (line.empty() != true) {
            if (line[0] < '1' || '6' < line[0] || line[1] < '1' || '5' < line[1]) {
                result = "NA";
                break;
            }
            char ch[3], add;
            ch[0] = line[0];
            ch[1] = line[1];
            if (ch[0] != '6') {
                add = 'a' + (line[0] - '1') * 5 + (line[1] - '1');
            } else {
                switch (ch[1]) {
                case '1':
                    add = 'z';
                    break;
                case '2':
                    add = '.';
                    break;
                case '3':
                    add = '?';
                    break;
                case '4':
                    add = '!';
                    break;
                case '5':
                    add = ' ';
                    break;
                default:
                    break;
                }
            }
            result += add;
            line.erase(0, 2);
        }
        cout << result << endl;
    }
}