#include <bits/stdc++.h>
using namespace std;
int Atoi(char);
int main() {
  int i, j, na, m, n;
  char c, data[5][6];
  string str, _str;
  c = 97;
  for (i = 0; i < 5; ++i) {
    for (j = 0; j < 5; ++j) {
      data[j][i] = c;
      ++c;
    }
  }
  data[0][5] = c;
  data[1][5] = '.';
  data[2][5] = '?';
  data[3][5] = '!';
  data[4][5] = ' ';
  while (cin >> str) {
    if (str.size() % 2 == 1) {
      cout << "NA" << endl;
    } else {
      na = 0;
      for (i = 0; i < str.size(); i += 2) {
        if (str[i] > '6' || str[i + 1] > '5') {
          cout << "NA" << endl;
          na = 1;
          break;
        }
        n = Atoi(str[i]);
        m = Atoi(str[i + 1]);
        _str.push_back(data[m - 1][n - 1]);
      }
      if (na == 0) cout << _str << endl;
      _str.clear();
    }
  }
  return 0;
}
int Atoi(char c) {
  int x;
  x = c - 48;
  return x;
}
