#include <bits/stdc++.h>
using namespace std;
template <class T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << *i << " ";
  cout << endl;
}
template <class T>
void chmin(T &t, T f) {
  if (t > f) t = f;
}
template <class T>
void chmax(T &t, T f) {
  if (t < f) t = f;
}
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
int main() {
  string str;
  while (getline(cin, str)) {
    string res = "";
    int i;
    if (str.size() % 2 == 0) {
      cout << "NA" << endl;
      continue;
    }
    for (i = 0; i < str.size() - 2; i += 2) {
      if (str[i] < '1' || '6' < str[i] || str[i + 1] < '1' ||
          '5' < str[i + 1]) {
        cout << "NA" << endl;
        goto a;
      }
      if (str[i] != '6') {
        res += 'a' + (str[i] - '1') * 5 + str[i + 1] - '1';
      } else {
        switch (str[i + 1]) {
          case '1':
            res += "z";
            break;
          case '2':
            res += ".";
            break;
          case '3':
            res += "?";
            break;
          case '4':
            res += "!";
            break;
          case '5':
            res += " ";
            break;
        }
      }
    }
    cout << res << endl;
  a:;
  }
  return 0;
}
