#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, f;
  string str;
  const char *table[] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  while (cin >> str) {
    string t, tmp;
    f = 1;
    if (str.size() % 2 == 0) {
      for (int i = 0; i < str.size(); i += 2) {
        tmp = str[i];
        x = atoi(tmp.c_str());
        tmp = str[i + 1];
        y = atoi(tmp.c_str());
        if (x > 5 || y > 4 || x == 0 || y == 0) {
          cout << "NA" << endl;
          f = 0;
          break;
        }
        if (f) t += table[x][y];
      }
      if (f) cout << t << endl;
    } else {
      cout << "NA" << endl;
    }
  }
  return 0;
}
