#include <bits/stdc++.h>
using namespace std;
string s, r;
inline int cast(char c) { return (int)(c - '0'); }
int main() {
  bool fg;
  int a, b;
  while (cin >> s) {
    fg = false;
    r = "";
    if (s.size() % 2 != 0) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < s.size(); i += 2) {
      a = cast(s[i]), b = cast(s[i + 1]);
      if (a > 6 || b > 5) {
        fg = true;
        break;
      }
      if (a < 6) {
        r += ('a' + ((a - 1) * 5 + (b - 1)));
      } else {
        switch (b) {
          case 1:
            r += 'z';
            break;
          case 2:
            r += '.';
            break;
          case 3:
            r += '?';
            break;
          case 4:
            r += '!';
            break;
          case 5:
            r += ' ';
            break;
          default:
            break;
        }
      }
    }
    if (fg) {
      cout << "NA" << endl;
    } else {
      cout << r << endl;
    }
  }
  return 0;
}
