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

char pbel(string x) {
	if (x == "11")return 'a';
	else if (x == "12")return 'b';
	else if (x == "13")return 'c';
	else if (x == "14")return 'd';
	else if (x == "15")return 'e';
	else if (x == "21")return 'f';
	else if (x == "22")return 'g';
	else if (x == "23")return'h';
	else if (x == "24")return 'i';
	else if (x == "25")return 'j';
	else if (x == "31")return 'k';
	else if (x == "32")return 'l';
	else if (x == "33")return 'm';
	else if (x == "34")return 'n';
	else if (x == "35")return 'o';
	else if (x == "41")return'p';
	else if (x == "42")return'q';
	else if (x == "43")return'r';
	else if (x == "44")return's';
	else if (x == "45")return't';
	else if (x == "51")return'u';
	else if (x == "52")return'v';
	else if (x == "53")return 'w';
	else if (x == "54")return'x';
	else if (x == "55")return'y';
	else if (x == "61")return'z';
	else if (x == "62")return'.';
	else if (x == "63")return'?';
	else if (x == "64")return'!';
	else if (x == "65")return' ';
	else return'+';
}

int main() {
	string s;
	while (cin >> s) {
		string pr;
		int a = s.size();
		int flg = 0;

		if (a % 2 == 0) {
			for (int i = 0;i < a;i += 2) {
				string sa;
				sa += s[i];
				sa += s[i + 1];
				if (pbel(sa) == '+') {
					flg = 1;
					break;
				}
				else {
					pr += pbel(sa);
				}
			}
		}
		else { flg = 1; }

		if (flg == 1)cout << "NA" << endl;
		else cout << pr << endl;
	}
	return 0;
}