#include <bits/stdc++.h>
using namespace std;
const int INF =
    sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
signed main() {
  string s;
  vector<vector<char>> v(7, vector<char>(7));
  char a = 'a';
  for (int j = (1); j < (7); j++) {
    for (int i = (1); i < (6); i++) {
      v[i][j] = a++;
    }
  }
  v[2][6] = '.';
  v[3][6] = '?';
  v[4][6] = '!';
  v[5][6] = ' ';
  for (int i = (0); i < (6); i++)
    if (1) {
      cerr << "v[i]";
      for (auto &e : (v[i])) cerr << " " << e;
      cerr << endl;
    };
  while (cin >> s) {
    if (s.size() & 1) {
      cout << "NA" << endl;
      continue;
    }
    bool f(false);
    string ans;
    for (int i = 0; i + 1 < s.size(); i += 2) {
      ans += v[s[i + 1] - '0'][s[i] - '0'];
    }
    cout << ans << endl;
  }
  return 0;
}
