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

int main(){
	string map[6];
	map[0] = "abcde";
	map[1] = "fghij";
	map[2] = "klmno";
	map[3] = "pqrst";
	map[4] = "uvwxy";
	map[5] = "z.?! ";
	string str;
	while(cin >> str){
		int num[1000]={0};
		int len = str.size();
		bool flag = false;
		for(int i=0;i<len;i+=2){
			if(str[i] <= '0' || str[i] > '6'){
				flag = true;
				break;
			}
			else if(str[i+1] <= '0' || str[i+1] > '5'){
				flag = true;
				break;
			}
		}
		if(len%2 == 1 || flag){
			cout << "NA" << endl;
			continue;
		}
		for(int i=0;i<len;i+=2){
			for(int j=i;j<i+2;j++){
				string tmp = "";
				tmp += str[j];
				istringstream ss(tmp);
				ss >> num[j];
				//cout << num[j] << endl;
			}
		}
		for(int i=0;i<len;i+=2){
			cout << map[num[i]-1][num[i+1]-1];
		}
		cout << endl;
	}
}