#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (cin >> s) {
    if (s.size() % 2) {
      cout << "NA" << endl;
      continue;
    }
    bool f = 1;
    string ans = "", t = "z.?! ";
    for (long long i = 0; i < s.size() / 2; i++) {
      if (s[2 * i] - '0' > 7 || s[2 * i + 1] - '0' > 6)
        f = 0;
      else if (s[2 * i] != '6') {
        ans += 'a' + 5 * (s[2 * i] - '1') + s[2 * i + 1] - '1';
      } else if (s[i * 2] == '6') {
        ans += t[s[2 * i + 1] - '1'];
      }
    }
    if (f)
      cout << ans << endl;
    else
      cout << "NA" << endl;
  }
}
