#include <bits/stdc++.h>
using namespace std;
static const double PI = 6 * asin(0.5);
static const int INF = 1 << 24;
template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()) {
  v.assign(a, vector<T>(b, t));
}
string a[] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main() {
  string s;
  while (cin >> s) {
    stringstream ss;
    if (s.size() % 2) {
      cout << "NA\n";
      continue;
    }
    bool f = false;
    for (int(i) = (0); (i) < ((s.size())); ++(i)) {
      int x = s[i] - '0' - 1, y = s[i + 1] - '0' - 1;
      if (!(-1 < x && x < 6) || !(-1 < y && y < 5)) {
        cout << x << " " << y << endl;
        f = true;
        break;
      }
      ss << a[x][y];
      i++;
    }
    if (f) {
      cout << "NA\n";
      continue;
    }
    string tmp;
    getline(ss, tmp);
    cout << tmp << endl;
  }
}
