#include<bits/stdc++.h>
using namespace std;
int main(){
	string a="abcdefghijklmnopqrstuvwxyz.?! ";
	string b;
	while(cin>>b){
		string f="";
		if(b.length()%2==1) {
			cout<<"NA"<<endl;
			goto stop;
		}
		for(int i=0;i<b.length();i+=2){
			int c,d;
			c=(int)b[i]-'0';
			d=(int)b[i+1]-'0';
			if(c>6||d>5||c<1||d<1) {
				cout<<"NA"<<endl;
				goto stop;
			}
			c--;
			int e=c*5+d;
			f+=a[e-1];
		}
		cout<<f<<endl;
		stop:;
	}
}