#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const char *data = "abcdefghijklmnopqrstuvwxyz.?! ";
int main(){
  string str;
  while(getline(cin,str)){
    string ans;
    int pos = 0;
    //printf("pos = %d, str.size()=%d\n",pos,str.size());
    while(true){
      if(pos != str.size()){
        if(pos + 1 == str.size())
          goto na;

        int a = str[pos++] - '0';
        int b = str[pos++] - '0';
        //printf("a = %d, b = %d\n",a,b);
        if(a < 1 || a > 6) goto na;
        if(b < 1 || b > 5) goto na;
        a--; b--;
        ans += data[a*5 + b];
      }else{
        cout << ans << endl;
        break;
      }
    }
    continue;
  na:
    cout << "NA" << endl;
  }
  return 0;
}