#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
string str;
char mozi[100];
string d;
int e;
int use;
char i = 'a';
int main() {
  for (int j = 1; j <= 6; j++) {
    for (int l = 1; l <= 5; l++) {
      if (j == 6 && l >= 2) break;
      mozi[j * 10 + l] = i++;
    }
  }
  mozi[62] = '.';
  mozi[63] = '?';
  mozi[64] = '!';
  mozi[65] = ' ';
  while (cin >> str) {
    use = 0;
    for (int i = 0; i < str.size(); i += 2) {
      d = str.substr(i, 2);
      e = toInt(d);
      if (e > 65 || e < 11) {
        cout << "NA" << endl;
        use = e;
      }
    }
    if (use == 0) {
      for (int i = 0; i < str.size(); i += 2) {
        d = str.substr(i, 2);
        e = toInt(d);
        cout << mozi[e];
      }
      cout << endl;
    }
  }
  return 0;
}
