#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int i, n, m, len;
  char str[10000];
  for (; fgets(str, sizeof(str), stdin) != NULL;) {
    len = strlen(str) - 1;
    for (i = 0; i < len - 1; i += 2) {
      if (len % 2 != 0) {
        printf("NA");
        break;
      }
      n = (str[i] - '0') % 48 - 1;
      m = (str[i + 1] - '0') % 48 - 1;
      if (n == 5 && m == 1)
        printf(".");
      else if (n == 5 && m == 2)
        printf("?");
      else if (n == 5 && m == 3)
        printf("!");
      else if (n == 5 && m == 4)
        printf(" ");
      else
        printf("%c", 'a' + n * 5 + m);
    }
    printf("\n");
  }
  return 0;
}
