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


char decode(int a,int b){
	int x=a*5+b;
	if(x<26)return x+'a';
	return ".?! "[x-26];
}

int main(){
	string s;
	while(cin>>s){
		bool f=true;
		string res;
		if(s.size()%2){
			f=false;
		}
		for(int i=0;f&&i<s.size();i+=2){
			if('1'<=s[i]&&s[i]<='6' && '1'<=s[i+1]&&s[i+1]<='5'){
				res+=decode(s[i]-'1',s[i+1]-'1');
			}else f=false;
		}
		if(f)cout<<res;
		else cout<<"NA";
		cout<<endl;
	}
	return 0;
}