#include <bits/stdc++.h>
template <class T>
void max_swap(T& a, const T& b) {
  a = max(a, b);
}
template <class T>
void min_swap(T& a, const T& b) {
  a = min(a, b);
}
using namespace std;
static const double EPS = 1e-5;
const int MODULO = 100000;
const int INF = 100000000;
using namespace std;
int main() {
  char t[] = "abcdefghijklmnopqrstuvwxyz.?! ";
  char buf[256];
  while (~scanf("%s", buf)) {
    int n = strlen(buf);
    if (n % 2 != 0) {
      puts("NA");
      continue;
    }
    n /= 2;
    char nw[256];
    for (int i = 0; i < (int)(n); i++) {
      int a = (buf[i * 2] - '0') * 5 + buf[i * 2 + 1] - '0' - 6;
      if (a >= 30) {
        puts("NA");
        continue;
      }
      nw[i] = t[a];
    }
    nw[n] = '\0';
    puts(nw);
  }
  return 0;
}
