#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  string s,t[6][5]={{"a","b","c","d","e"},{"f","g","h","i","j"},{"k","l","m","n","o"},{"p","q","r","s","t"},{"u","v","w","x","y"},{"z",".","?","!"," "}};
  bool f;
  while(cin >> s){
    f=true;
    if(s.size()%2){
      cout << "NA\n";
      continue;
    }
    for(int i=0;i<s.size();i++){
      if(i%2==0){
        if((int)s[i]>54){
          cout << "NA\n";
          f=false;
        }
      }else{
        if((int)s[i]>53){
          cout << "NA\n";
          f=false;
        }
      }
      if((int)s[i]<49 and f){
        cout << "NA\n";
        f=false;
      }
      if(!f)break;
    }
    if(!f)continue;
    for(int i=0;i<s.size();i+=2){
      cout << t[(int)s[i]-49][(int)s[i+1]-49];
    }
    cout << endl;
  }
  return 0;
}
