#include <bits/stdc++.h>
using namespace std;
int main() {
  char c[4] = {'.', '?', '!', ' '};
  string S;
  while (cin >> S) {
    string ans;
    if (S.size() % 2 != 0) {
      puts("NA");
      goto NEXT;
    }
    for (int i = 0; i < S.size(); i += 2) {
      if (!isdigit(S[i]) || !isdigit(S[i + 1]) || S[i] == '0' ||
          S[i + 1] == '0') {
        puts("NA");
        goto NEXT;
      }
      int n = (S[i] - '0' - 1) * 5 + (S[i + 1] - '0' - 1);
      if (n < 26)
        ans += ('a' + n);
      else if (n < 30)
        ans += c[n - 26];
      else {
        puts("NA");
        goto NEXT;
      }
    }
    cout << ans << endl;
  NEXT:;
  }
  return 0;
}
