#include<stdio.h>
#include<iostream>
#include<string>
using namespace std;

int main(){
char w[8][7]={{"abcde"},{"fghij"},{"klmno"},{"pqrst"},{"uvwxy"},{"z.?! "}};
string st;
while(cin>>st){
	bool f=true;char W[200]={};

if(st.size()%2==1)cout<<"NA"<<endl;
else{
for(int i=0;i<(st.size());i+=2){
int x=st[i]-'0'-1;int y=st[i+1]-'0'-1;
W[i/2]=w[x][y];
if(x>5||x<0||y>4||y<0)f=false;
}

if(f==false)cout<<"NA"<<endl;
else cout<<W<<endl;
}
}
return 0;
}