#include <bits/stdc++.h>
int main(void) {
  char change[6][5] = {{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
                       {'k', 'l', 'm', 'n', 'o'}, {'q', 'p', 'r', 's', 't'},
                       {'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
  char str[256];
  char out[256];
  int i, j;
  while (fgets(str, 256, stdin) != NULL) {
    for (i = 0; i < 256; i++) {
      out[i] = '\0';
    }
    j = 0;
    while (str[j] != '\0' && str[j + 1] != '\0') {
      if (str[j] >= '1' && str[j] <= '6' && str[j + 1] >= '1' &&
          str[j + 1] <= '5') {
        strncat(out, &change[str[j] - '0' - 1][str[j + 1] - '0' - 1], 1);
      } else {
        strcpy(out, "NA");
        break;
      }
      j += 2;
    }
    printf("%s\n", out);
    for (i = 0; i < 256; i++) {
      str[i] = '\0';
    }
  }
  return (0);
}
