//03
#include<iostream>
#include<sstream>
#include<string>

using namespace std;

int main(){
  for(string s;getline(cin,s);){
    if(s.size()%2){
      goto err;
    }else{
      string o;
      for(int i=0;i*2<s.size();i++){
	const char *t="abcdefghijklmnopqrstuvwxyz.?! ";
	if(s[i*2]<'1'||s[i*2]>'6'||s[i*2+1]<'1'||s[i*2+1]>'5')goto err;
	int idx=(s[i*2]-'1')*5+s[i*2+1]-'1';
	o+=t[idx];
      }
      cout<<o<<endl;
      continue;
    }
  err:
    cout<<"NA"<<endl;
  }
  return 0;
}