#include <bits/stdc++.h>
using namespace std;
string res[6];
const char OFS = '1';
int main() {
  res[0] = "abcde";
  res[1] = "fghij";
  res[2] = "klmno";
  res[3] = "pqrst";
  res[4] = "uvwxy";
  res[5] = "z.?! ";
  string s;
  while (getline(cin, s)) {
    bool na = false;
    int l = s.size();
    if (l % 2) na = true;
    s += "z";
    for (int i = 0; i < l / 2; i++) {
      if (s[i * 2] >= '7') na = true;
      if (s[i * 2 + 1] >= '6') na = true;
    }
    if (na) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < l / 2; i++)
      cout << res[(char)(s[i * 2] - OFS)][(char)(s[i * 2 + 1] - OFS)];
    cout << endl;
  }
  return 0;
}
