#include <bits/stdc++.h>
using namespace std;
char t[5][6];
int main() {
  char c = 'a';
  for (int j = 0; j < 5; ++j) {
    for (int i = 0; i < 5; ++i) {
      t[i][j] = c;
      c++;
    }
  }
  t[0][5] = 'z';
  t[1][5] = '.';
  t[2][5] = '?';
  t[3][5] = '!';
  t[4][5] = ' ';
  string ns;
  while (cin >> ns) {
    if (ns.length() % 2) {
      cout << "NA" << endl;
    } else {
      for (int i = 0; i < ns.length() - 1; i += 2) {
        cout << t[ns[i + 1] - '1'][ns[i] - '1'];
      }
      cout << endl;
    }
  }
  return 0;
}
