#include <bits/stdc++.h>
using namespace std;
template <class _T>
_T MAX(_T p1, _T p2) {
  return (p1 > p2) ? p1 : p2;
}
template <class _T>
_T MIN(_T p1, _T p2) {
  return (p1 < p2) ? p1 : p2;
}
template <class _Tv>
inline string join(_Tv &v, string sep = " ") {
  ostringstream s;
  for (__typeof__((v).begin()) it = (v).begin(); it != (v).end(); ++it) {
    if (it != v.begin()) s << sep;
    s << *it;
  };
  return s.str();
}
char tbl[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
string solve(string s) {
  string r;
  int n = s.length();
  if (n % 2) return "NA";
  for (int i = 0; i < n; i += 2) {
    if (!isdigit(s[i]) || !isdigit(s[i + 1])) return "NA";
    int i1 = s[i] - '0', i2 = s[i + 1] - '0';
    r += tbl[i1 - 1][i2 - 1];
  }
  return r;
}
int main() {
  string s;
  while (cin >> s) {
    cout << solve(s) << endl;
  }
  return 0;
}
