#include <bits/stdc++.h>
using namespace std;
int main() {
  string alpha = "abcdefghijklmnopqrstuvwxyz.?! ";
  char table[5][6];
  int t = 0;
  for (int i = 0; i < 6; i++) {
    for (int j = 0; j < 5; j++) {
      table[j][i] = alpha[t];
      t++;
    }
  }
  string s;
  while (cin >> s) {
    if (s.size() % 2 != 0) {
      cout << "NA" << endl;
    } else {
      t = 0;
      while (true) {
        if (t >= s.size()) {
          break;
        }
        int a = s[t] - '1';
        int b = s[t + 1] - '1';
        cout << table[b][a];
        t += 2;
      }
      cout << endl;
    }
  }
  return 0;
}
