#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
template <class T>
T RoundOff(T a) {
  return int(a + .5 - (a < 0));
}
template <class T, class C>
void chmax(T& a, C b) {
  if (a < b) a = b;
}
template <class T, class C>
void chmin(T& a, C b) {
  if (b < a) a = b;
}
template <class T, class C>
pair<T, C> mp(T a, C b) {
  return make_pair(a, b);
}
int main() {
  string table[6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  for (string line; cin >> line;) {
    if (line.size() % 2) {
      cout << "NA" << endl;
      continue;
    }
    string ans;
    for (int i = 0; i < line.size() / 2; i++)
      if ('0' < line[i * 2] && '0' < line[i * 2 + 1])
        ans += table[line[i * 2] - '1'][line[i * 2 + 1] - '1'];
    if (ans.size() * 2 == line.size())
      cout << ans << endl;
    else
      cout << "NA" << endl;
  }
}
