#include <iostream>
using namespace std;
/*
  1 2 3 4 5 6
1 a f k p u z
2 b g l q v .
3 c h m r w ?
4 d i n s x !
5 e j o t y  
*/
char conv(string str) {
	int c=str[0]-'0'-1, v=str[1]-'0'-1;
	if (c<5) {
		return 'a'+5*c+v;
	} else {
		switch (v) {
			case 0:
				return 'z';
			case 1:
				return '.';
			case 2:
				return '?';
			case 3:
				return '!';
			case 4:
				return ' ';
		}
	}
}
int main() {
	string mes;
	while (cin>>mes) {
		if (mes.length()%2!=0) cout << "NA" << endl;
		else {
			string temp="", res="";
			for (int i=0; i<mes.length(); i++) {
				if (i%2!=0) {
					temp += mes[i];
					res += conv(temp);
					temp = "";
				} else temp += mes[i];
			}
			cout << res << endl;
		}
	}
}