#include <bits/stdc++.h>
using namespace std;
string s;
char tab[10][10] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "x.?! "};
void solve() {
  int n = 0, k = 0;
  char ans[1000];
  if (s.size() % 2 != 0) {
    cout << "NA" << endl;
    return;
  } else {
    while (n < s.size()) {
      if (s[n] >= '1' && s[n] < '7' && s[n + 1] >= '1' && s[n + 1] < '6')
        ans[k++] = tab[s[n] - 1 - '0'][s[n + 1] - 1 - '0'];
      else {
        cout << "NA" << endl;
        return;
      }
      n += 2;
    }
    for (int i = 0; i < k; i++) cout << ans[i];
    cout << endl;
  }
}
int main() {
  while (cin >> s) {
    solve();
  }
  return 0;
}
