#include <bits/stdc++.h>
int main() {
  int i, j, k = 0, h, f;
  char a[8][7], b[300], c[200];
  for (i = 0; i < 6; i++)
    for (j = 0; j < 5; j++) {
      a[i][j] = 'a' + k;
      k++;
      if (i == 5) break;
    }
  a[5][1] = '.';
  a[5][2] = '?';
  a[5][3] = '!';
  a[5][4] = ' ';
  while (scanf("%s", b) != EOF) {
    h = strlen(b);
    k = 0;
    f = 0;
    if (h % 2 != 0)
      printf("NA\n");
    else {
      while (k != h) {
        i = b[k++] - '0';
        j = b[k++] - '0';
        if (i > 6 || j > 5)
          break;
        else {
          c[f++] = a[i - 1][j - 1];
        }
      }
      for (i = 0; i < f; i++) printf("%c", c[i]);
      printf("\n");
    }
  }
  return 0;
}
