#include <bits/stdc++.h>
using namespace std;
char conv(string str) {
  int c = str[0] - '0' - 1, v = str[1] - '0' - 1;
  if (c < 5) {
    return 'a' + 5 * c + v;
  } else if (c == 5) {
    switch (v) {
      case 0:
        return 'z';
      case 1:
        return '.';
      case 2:
        return '?';
      case 3:
        return '!';
      case 4:
        return ' ';
    }
  } else {
    return '0';
  }
}
int main() {
  string mes;
  while (cin >> mes) {
    if (mes.length() % 2 != 0)
      cout << "NA" << endl;
    else {
      string temp = "", res = "";
      for (int i = 0; i < mes.length(); i++) {
        if (i % 2 != 0) {
          temp += mes[i];
          char rchar = conv(temp);
          if (rchar == '0') {
            res = "NA";
            break;
          } else {
            res += rchar;
          }
          temp = "";
        } else
          temp += mes[i];
      }
      cout << res << endl;
    }
  }
}
