#include <bits/stdc++.h>
using namespace std;
string pat[5] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
map<string, char> mp;
int main() {
  for (int i = 0; i < 5; i++) {
    for (int j = 0; j < 6; j++) {
      stringstream ss;
      ss << (j + 1) << (i + 1);
      mp[ss.str()] = pat[i][j];
    }
  }
  string in;
  bool first = true;
  while (cin >> in) {
    if (first) {
      first = false;
    } else {
      cout << endl;
    }
    if (in.size() % 2 == 1) {
      cout << "NA";
      continue;
    }
    string ret = "";
    for (int i = 0; i < in.size(); i += 2) {
      string s = in.substr(i, 2);
      if (mp.count(s) == 0) {
        ret = "NA";
        break;
      } else {
        ret += mp[s];
      }
    }
    cout << ret;
  }
  return 0;
}
