#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int i, j;
  string s;
  char a[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  while (cin >> s) {
    string ans = "";
    if (s.size() % 2) {
      cout << "NA" << endl;
      continue;
    }
    for (i = 0; i < s.size(); i++) {
      if (s[i] < '0' || s[i] > '6' || s[i + 1] < '0' || s[i + 1] > '5') {
        ans = "NA";
        break;
      }
      ans += a[s[i] - '0' - 1][s[i + 1] - '0' - 1];
      i++;
    }
    cout << ans << endl;
  }
}
