#include<iostream>
#include<cstring>
#include<string>
using namespace std;
int n(char c){
  return c - '0';
}
int main(void){
  char c[8][8];
  string s, ans;
  int l, x, y;
  strcpy(c[1], "abcde"); strcpy(c[2], "fghij"); strcpy(c[3], "klmno");
  strcpy(c[4], "pqrst"); strcpy(c[5], "uvwxy"); strcpy(c[6], "z.?! ");
 lbl:;
  while(cin >> s){
    l = s.size();
    if(l % 2){
      cout << "NA" << endl;
      continue;
    }
    ans = "";
    for(int i = 0;i < l; i += 2){
      x = n(s[i]); y = n(s[i + 1]);
      if(1 <= x && x <= 6 && 1 <= y && y <= 5)
	ans += c[x][--y];
      else{
	cout << "NA" << endl;
	goto lbl;
      }
    }
    cout << ans << endl;
  }
}
