#include <bits/stdc++.h>
int main() {
  char data[7][7];
  char input[402];
  int i, j, k, p, len, a, b;
  k = 0;
  p = 0;
  for (i = 0; i < 6; i++) {
    for (j = 0; j < 5; j++) {
      if (j == 1 && i == 5) {
        data[j][i] = '.';
        k++;
        continue;
      }
      if (j == 2 && i == 5) {
        data[j][i] = '?';
        k++;
        continue;
      }
      if (j == 3 && i == 5) {
        data[j][i] = '!';
        k++;
        continue;
      }
      if (j == 4 && i == 5) {
        data[j][i] = ' ';
        k++;
        continue;
      }
      data[j][i] = 'a' + k;
      k++;
    }
  }
  while (1) {
    if (scanf("%c", &input[0]) == EOF) break;
    if (input[0] == '\n') continue;
    for (i = 1; i < 400; i++) {
      scanf("%c", &input[i]);
      if (input[i] == '\n') {
        len = i;
        break;
      }
    }
    p = 0;
    if ((len % 2) != 0) {
      printf("NA\n");
      continue;
    }
    for (i = 0; i < len; i++) {
      if (input[i] < '1' || input[i] > '6') {
        p = 1;
        break;
      }
    }
    if (p == 1) {
      printf("NA\n");
      continue;
    }
    for (i = 0;; i += 2) {
      if (i == len || i + 1 == len) break;
      a = input[i + 1] - '0';
      b = input[i] - '0';
      printf("%c", data[a - 1][b - 1]);
    }
    printf("\n");
  }
  return 0;
}
