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

int main(){
	int x,y,f;
	string str,t,tmp;
	const char *table[] = {"abcde","fghij","klmno","pqrst","uvwxy","z.?! "};
	while(cin >> str){
		t = "\0";
		f = 1;
		if(str.size() % 2 == 0){
			for(int i = 0;i < str.size();i += 2){
				tmp = str[i];
				x = atoi(tmp.c_str());
				tmp = str[i+1];
				y = atoi(tmp.c_str());
				if(x > 5 || y > 4 || x == 0 || y == 0){
					cout << "NA" << endl;
					f = 0;
					break;
				}
				if(f) t += table[x][y];
			}
			cout << t << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}
	return 0;
}