#include <bits/stdc++.h>
char table[6][7] = {
    {'0', '0', '0', '0', '0', '0', '0'}, {'0', 'a', 'f', 'k', 'p', 'u', 'z'},
    {'0', 'b', 'g', 'l', 'q', 'v', '.'}, {'0', 'c', 'g', 'm', 'r', 'w', '?'},
    {'0', 'd', 'i', 'n', 's', 'x', '!'}, {'0', 'e', 'j', 'o', 't', 'y', ' '},
};
int main() {
  char str[201] = {};
  int length = 0, i;
  char message[101];
  while (scanf("%s", str) != EOF) {
    if ((length = strlen(str)) % 2) {
      printf("NA\n");
      continue;
    }
    i = 0;
    memset((void*)message, 0, strlen(message));
    while (i < length) {
      if (str[i] - '0' > 0 && str[i] - '0' < 7 && str[i + 1] - '0' > 0 &&
          str[i + 1] - '0' < 6) {
        message[i / 2] = table[str[i + 1] - '0'][str[i] - '0'];
        i += 2;
      } else {
        printf("NA\n");
        i = -1;
        break;
      }
    }
    if (i == -1) {
      continue;
    } else {
      i++;
      message[i / 2] = 0;
      printf("%s\n", message);
    }
  }
  return 0;
}
