#include <bits/stdc++.h>
static const char tbl[] = "abcdefghijklmnopqrstuvwxyz.?! ";
int main(int argc, char* argv[]) {
  char s[128];
  while (scanf("%s", s) == 1) {
    char* p;
    char* q;
    for (p = q = s; *p != '\0'; p += 2) {
      if (p[0] < '1' || p[0] > '6' || p[1] < '1' || p[1] > '5') goto NA;
      *(q++) = tbl[(p[0] - '1') * 5 + p[1] - '1'];
    }
    for (p = s; p != q; ++p) {
      putchar(*p);
    }
    puts("");
    continue;
  NA:
    puts("NA");
  }
  return (0);
}
