#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
string a = "afkpu";
int main(void){
  string line;
  while(cin>>line){
    string ans;
    bool na = false;
    if(line.size()%2){
      na = true;
    }
    for(int i=0;i<(int)line.size(); i+=2){
      if(na) break;
      if(line[i+1]>='6'||line[i+1]<='0'){
        na = true;
        break;
      }
      if(line[i]<='5'){
        ans+=(char)(a[line[i]-'1']+line[i+1]-'1');
      }else if(line[i]=='6'){
        if(line[i+1]=='1') ans+='z';
        if(line[i+1]=='2') ans+='.';
        if(line[i+1]=='3') ans+='?';
        if(line[i+1]=='4') ans+='!';
        if(line[i+1]=='5') ans+=' ';
      }else{
        na = true;
        break;
      }
    }
    if(!na)cout<<ans<<endl;
    else cout<<"NA"<<endl;
  }
  return 0;
}