#include <bits/stdc++.h>
const char table[5][7] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
bool isdigitS(char *s) {
  int i;
  for (i = 0; s[i] != '\0'; i++) {
    if (!isdigit(s[i])) return false;
  }
  return true;
}
int main(void) {
  char s[256];
  while (~scanf("%s", s)) {
    int i;
    if (!isdigitS(s) || strlen(s) % 2 != 0) {
      puts("NA");
      continue;
    }
    for (i = 0; s[i] != '\0'; i += 2) {
      if ('1' <= s[i] && s[i] <= '6' && '1' <= s[i + 1] && s[i + 1] <= '5') {
        printf("%c", table[s[i + 1] - '0' - 1][s[i] - '0' - 1]);
      } else {
        printf("NA");
        break;
      }
    }
    puts("");
  }
  puts("end");
  return 0;
}
