#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  char ch[4] = {'.', '?', '!', ' '};
  while (cin >> s) {
    if (s.length() % 2 != 0) {
      cout << "NA" << endl;
      continue;
    }
    bool f = 0;
    for (int i = (0); i < (s.length() / 2); ++(i)) {
      int x = s[2 * i] - '0';
      if (x < 1 || 6 < x) {
        f = 1;
        break;
      }
      int y = s[2 * i + 1] - '0';
      if (y < 1 || 5 < y) {
        f = 1;
        break;
      }
      int ret = (x - 1) * 5 + y;
      if (ret <= 26)
        cout << (char)('a' + ret - 1);
      else
        cout << ch[ret - 27];
    }
    if (f) cout << "NA";
    cout << endl;
  }
  return 0;
}
