#include <bits/stdc++.h>
using namespace std;
string mp[6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main() {
  string s;
  while (cin >> s) {
    if (s.length() % 2) {
      cout << "NA" << endl;
      continue;
    }
    string res = "";
    for (int i = 0; i < s.length(); i += 2) {
      if (s[i] >= '7' || s[i] <= '0' || s[i + 1] >= '7' || s[i + 1] <= '0') {
        cout << "NA" << endl;
        goto NEXT;
      }
      res += string(1, mp[s[i] - '1'][s[i + 1] - '1']);
    }
    cout << res << endl;
  NEXT:;
  }
}
