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

int main(){
	string ss,ans;
	while(cin>>ss){
		int size=ss.size();
		if(size%2==1){
			cout<<"NA"<<endl;
			continue;
		}
		for(int i=0;i<size;i+=2){
			int num1=ss[i]-'0';
			int num2=ss[i+1]-'0';
			if(num1<1 || num1>6 || num2<1 || num2>5){
				ans="NA";
				break;
			}
			int num=((int)(ss[i]-'0')-1)*5+((int)(ss[i+1]-'0'))-1;
			if(num<26){
				ans+=(char)(num+'a');
			}else if(num==26){
				ans+='.';
			}else if(num==27){
				ans+='?';
			}else if(num==28){
				ans+='!';
			}else if(num==29){
				ans+=" ";
			}else{
				ans="NA";
				break;
			}
		}
		cout<<ans<<endl;
		ans="";
	}
	return 0;
}