#include <bits/stdc++.h>
using namespace std;
int main() {
  char m = 'a';
  vector<char> str(31);
  for (int i = 1; i <= 26; i++) {
    str[i] = 'a' + i - 1;
  }
  str[27] = '.';
  str[28] = '?';
  str[29] = '!';
  str[30] = ' ';
  string line;
  while (cin >> line) {
    if (line.size() % 2 != 0) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < line.size(); i += 2) {
      int tmp = (line[i + 1] - '0') + ((line[i] - '0' - 1) * 5);
      cout << str[tmp];
    }
    cout << endl;
  }
  return 0;
}
