#include<iostream>
#include<string>
#define rep(i,x) for(int i=0;i<x;i++)
using namespace std;
string s;
char tab[10][10]={"abcde","fghij","klmno","pqrst","uvwxy","z.?! "};
void solve(){
	int n=0,k=0;
	char ans[1000];
	if(s.size()%2!=0){
		cout<<"NA"<<endl;
		return ;
	}
	else{
		while(n<s.size()){
			if(s[n]>='1'&&s[n]<'7'&&s[n+1]>='1'&&s[n+1]<'6')
			ans[k++]=tab[s[n]-1-'0'][s[n+1]-1-'0'];
			else{

				cout<<"NA"<<endl;
				return ;
			}
			n+=2;
		}
		rep(i,k)
		cout<<ans[i];
		cout<<endl;
	}
}
int main(){
	while(cin>>s){
		solve();
	}
	return 0;
}