#include <bits/stdc++.h>
using namespace std;
int main() {
  char graph[6][7] = {{0, 0, 0, 0, 0, 0, 0},
                      {0, 97, 102, 107, 112, 117, 122},
                      {0, 98, 103, 108, 113, 118, '.'},
                      {0, 99, 104, 109, 114, 119, '?'},
                      {0, 100, 105, 110, 115, 120, '!'},
                      {0, 101, 106, 111, 116, 121, ' '}};
  string s;
  while (cin >> s, !cin.eof()) {
    if (s.size() % 2 == 1) {
      cout << "NA" << endl;
      continue;
    };
    for (int i = 0; i < s.size(); i += 2) {
      if (s[i] - '0' > 6 || s[i + 1] - '0' > 5) {
        cout << "NA";
        break;
      }
      cout << graph[s[i + 1] - '0'][s[i] - '0'];
    }
    cout << endl;
  }
}
