#include <bits/stdc++.h>
using namespace std;
int main() {
  char code[] = "abcdefghijklmnopqrstuvwxyz.?! ";
  string s;
  while (cin >> s) {
    if (s.length() % 2 == 1)
      cout << "NA";
    else {
      for (int i = 0; i < s.length(); i += 2) {
        int c = s[i] - '0' - 1, r = s[i + 1] - '0' - 1;
        if (0 <= c && c <= 5 && 0 <= r && r <= 4) {
          cout << code[c * 5 + r];
        } else {
          cout << "NA";
          break;
        }
      }
    }
    cout << endl;
  }
  return 0;
}
