#include <bits/stdc++.h>
using namespace std;
int main() {
  string map[6];
  map[0] = "abcde";
  map[1] = "fghij";
  map[2] = "klmno";
  map[3] = "pqrst";
  map[4] = "uvwxy";
  map[5] = "z.?! ";
  string str;
  while (cin >> str) {
    int num[1000] = {0};
    int len = str.size();
    if (len % 2 == 1) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < len; i += 2) {
      for (int j = i; j < i + 2; j++) {
        string tmp = "";
        tmp += str[j];
        istringstream ss(tmp);
        ss >> num[j];
      }
    }
    for (int i = 0; i < len; i += 2) {
      cout << map[num[i] - 1][num[i + 1] - 1];
    }
    cout << endl;
  }
}
