#include <bits/stdc++.h>
using namespace std;
int main() {
  string line;
  while (cin >> line) {
    if (line.length() % 2) {
      cout << "NA" << endl;
      continue;
    }
    string res;
    for (unsigned int i = 0; i + 1 < line.length(); i += 2) {
      int a, b;
      a = line[i] - '1';
      b = line[i + 1] - '1';
      int code = a * 5 + b;
      if (code < 26) {
        res += 'a' + code;
      } else if (code == 26) {
        res += '.';
      } else if (code == 27) {
        res += '?';
      } else if (code == 28) {
        res += '!';
      } else if (code == 29) {
        res += ' ';
      } else {
        res = "NA";
        break;
      }
    }
    cout << res << endl;
  }
  return 0;
}
