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

string tbl = "abcdefghijklmnopqrstuvwxyz.?! ";

int main() {
    string s;
    while (cin >> s) {
        int n = s.size();
        if (n % 2 == 1) {
            cout << "NA" << endl;
        } else {
            string ans = "";
            for (int i=0; i+1<n; i+=2) {
                int a = s[i] - '0';
                int b = s[i+1] - '0';
                if (1 <= a && a <= 6 && 1 <= b && b <= 5) {
                    ans = ans + tbl[(a-1) * 5 + (b-1)];
                } else {
                    ans = "NA";
                    break;
                }
            }
            cout << ans << endl;
        }
    }
    return 0;
}