#include <bits/stdc++.h>
int main() {
  char s[203];
  char c[6][6] = {{"abcde"}, {"fghij"}, {"klmno"},
                  {"pqrst"}, {"uvwxy"}, {"z.?! "}};
  int i;
  while (fgets(s, 202, stdin) != NULL) {
    char b[102] = {0};
    for (i = 0; s[i] != 10; i += 2) {
      if (0 <= s[i] - '0' && s[i] - '0' <= 6 && 0 <= s[i + 1] - '0' &&
          s[i + 1] - '0' <= 5) {
        b[i / 2] = c[s[i] - '0' - 1][s[i + 1] - '0' - 1];
      } else {
        printf("NA\n");
        break;
      }
    }
    if (s[i] == 10) {
      b[i / 2] = 0;
      printf("%s\n", b);
    }
  }
  return 0;
}
