#include <iostream>
#include <string>
using namespace std;
char m[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','.','?','!',' '},
};
int main()
{
  string s;
  while(cin >> s){
    int i,j,k,l = s.length();
    if(l % 2 == 1) {
      cout << "NA" << endl;
      continue;
    }
    char t[102];
    for(i=0; i<l/2; i++){
      j = s[i*2] - '0' - 1;
      k = s[i*2+1] - '0' - 1;
      if(j > 5 || k > 4) {
	cout << "NA" << endl;
	break;
      }
      t[i] = m[j][k];
    }
    if(i >= l/2) {
      t[i] = '\0';
      cout << t << endl;
    }
  }
  return 0;
}