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

int main(void){
	string str;
	while(cin >> str){
		string ans;
		bool ch=true;
		if(str.size()%2==1)cout << "NA" << endl;
		else{
			for(int i=0;i<str.size();i+=2){
				
				if(str[i]>='1' && str[i]<='6' && str[i+1]>='1' && str[i+1]<='5'){
					if(str[i]=='6' && str[i+1]=='2')ans+=".";
					else if(str[i]=='6' && str[i+1]=='3')ans+="?";
					else if(str[i]=='6' && str[i+1]=='4')ans+="!";
					else if(str[i]=='6' && str[i+1]=='5')ans+=" ";
					else ans+=(str[i]-'1')*5+(str[i+1]-'1')+'a';
				}else{
					ch=false;
					break;
				}
			}
			if(ch==true)cout << ans << endl;
			else cout << "NA" << endl;
		}
	}
    return 0;
}