#include <iostream>
#include <string>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	string s;
	char ch[4] = {'.', '?', '!', ' '};
	while(cin >> s) {
		if(s.length()%2!=0) {
			cout << "NA" << endl;
			continue;
		}
		rep(i,s.length()/2) {
			char x = s[2*i];
			if(x<'1' || '6'<x) {
				cout << "NA";
				break;
			}
			char y = s[2*i+1];
			if(y<'1' || '5'<y) {
				cout << "NA";
				break;
			}
			int ret = (x-'0'-1)*5+y-'0'; 
			if(ret<=26) cout << (char)('a'+ret-1);
			else cout << ch[ret-27];
		}
		cout << endl;
	}
	return 0;
}