#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int main(){

	char table[20][20];
	string str;

	for(int i = 1; i <= 6; i++){
		for(int j = 1; j <= 5; j++){
			table[j][i]='a'+5*(i-1)+(j-1);
			if(i==6&&j==1)
				break;
		}
		if(i==6){
			table[2][6]='.';
			table[3][6]='?';
			table[4][6]='!';
			table[5][6]=' ';
		}
	}

	while(cin>>str){
		if(str.size()%2==1){
			cout<<"NA"<<endl;
			continue;
		}
		bool f=false;
		string cs;
		for(int i = 0; i < str.size(); i+=2){
			if(str[i]>='1'&&str[i]<='6'&&str[i+1]>='1'&&str[i+1]<='5'){
				cs+=table[str[i+1]-'0'][str[i]-'0'];
			}
			else{
				f=true;
				cout<<"NA"<<endl;
				break;
			}
		}
		if(f)
			continue;
		else{
			cout<<cs<<endl;
		}
	}

	return 0;
}