#include <bits/stdc++.h>
using namespace std;
const string table[] = {
    "abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! ",
};
string solve(string src) {
  if (src.size() % 2) {
    return "NA";
  }
  string res;
  for (int i = 0; i < src.size(); i += 2) {
    int idx1 = src[i] - '1', idx2 = src[i + 1] - '1';
    if (6 <= idx1 || 5 <= idx2) {
      return "NA";
    }
    res += table[idx1][idx2];
  }
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string str;
  while (cin >> str) {
    cout << solve(str) << endl;
  }
  return 0;
}
