#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
void preview(T a, T b) {
  for (T it = a; it != b; ++it) cerr << *it << " ";
  cerr << endl;
}
const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;
char *dic = "abcdefghijklmnopqrstuvwxyz.?! ";
int main() {
  for (string line; cin >> line;) {
    if (line.length() & 1) {
      cout << "NA" << endl;
      continue;
    }
    bool ok = true;
    int n = line.length();
    for (int i = 0; i < n; i += 2) {
      int c = line[i] - '0';
      if (c > 6) ok = false;
      c = line[i + 1] - '0';
      if (c > 5) ok = false;
    }
    if (!ok) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < n; i += 2) {
      cout << dic[5 * (line[i] - '0' - 1) + (line[i + 1] - '0' - 1)];
    }
    cout << endl;
  }
  return 0;
}
