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


int main(){
    char map[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 s;
    while (cin >> s){
	bool err = false;
	for (int i = 0; i < s.size(); i++){
	    if (i % 2 && (s[i] > '5' || s[i] < '1')) err = true;
	    else if (i % 2 == 0 && (s[i] > '6' || s[i] < '1')) err = true;
	}
	if (s.size() % 2 || err) cout << "NA" << endl;

	else {
	    for (int i = 0; i < s.size(); i+=2){
		cout << map[s[i]-'0'-1][s[i+1]-'0'-1];
	    }
	    cout << endl;
	}
    }
}