#include <bits/stdc++.h>
using namespace std;
char c[] = {'z', '.', '?', '!', ' '};
string s;
int main() {
  while (cin >> s) {
    int l = s.size();
    if (l % 2) {
      cout << "NA" << endl;
      continue;
    }
    int cur = 0, f = 0;
    string ans = "";
    while (cur < l) {
      int a = s[cur++] - '0', b = s[cur++] - '0';
      if (a < 1 || a > 6 || b < 1 || b > 5) {
        cout << "NA" << endl;
        f = 1;
        continue;
      }
      if (a < 6) ans += (char)('a' + (a - 1) * 5 + b - 1);
      if (a == 6) ans += c[b - 1];
    }
    if (!f) cout << ans << endl;
  }
}
