#include<bits/stdc++.h>
using namespace std;
int main(){
  char table[5][6];
  char c='a';
  for(int j=0;j<5;j++){
    for(int i=0;i<5;i++){
      table[i][j]=c;
      c++;
    }
  }
  table[0][5]='z';table[1][5]='.';table[2][5]='?';table[3][5]='!';table[4][5]=' ';
 
  string s;
  while(cin>>s){
    int flag=0;
    for(int i=0;i<s.size();i+=2){
      if(s[i]>'6' || s[i]<'1' || s[i+1]>'5' || s[i+1]<'1'){
	flag=1;
      }
    }
    if(s.size()%2==0 && flag==0){
      //cout<<s.size()<<endl;
      for(int i=0;i<s.size();i+=2){
	cout<<table[s[i+1]-'0'-1][s[i]-'0'-1];
      }
      cout<<endl;
    }else{
      cout<<"NA"<<endl;
    }
  }
}
  