#include <iostream>
#include <vector>
#include <string>
#include <cstdio>
#include <map>
#include <sstream>
using namespace std;

string pat[5] = {
	"afkpuz",
	"bglqv.",
	"chmrw?",
	"dinsx!",
	"ejoty "
};

map<string, char> mp;

int main(){
	for(int i=0;i<5;i++){
		for(int j=0;j<6;j++){
			stringstream ss;
			ss << (j + 1) << (i + 1);
			mp[ss.str()] = pat[i][j];
		}
	}

	string in;
	while(cin >> in){
		if(in.size() % 2 == 1){
			cout << "NA" << endl;
			continue;
		}
		string ret = "";
		for(int i=0;i<in.size();i+=2){
			string s = in.substr(i,2);
			if(mp.count(s) == 0){
				ret = "NA";
				break;
			} else {
				ret += mp[s];
			}
		}
		cout << ret << endl;
	}
	return 0;
}