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