#include <bits/stdc++.h>
int main() {
  char table[7][6], moji, chara[5] = {'z', '.', '?', '!', ' '}, s[256];
  moji = 'a';
  for (int i = 1; i < 7; i++) {
    for (int j = 1; j < 6; j++) {
      if (i < 6)
        table[i][j] = moji++;
      else
        table[i][j] = chara[j - 1];
    }
  }
  while (~scanf("%s", s)) {
    int length = strlen(s);
    if (length % 2 != 0)
      printf("NA");
    else {
      int i;
      for (i = 1; i < length; i += 2)
        if (s[i - 1] - 48 > 6 || s[i] - 48 > 5) break;
      if (i > length)
        for (i = 1; i < length; i += 2)
          printf("%c", table[s[i - 1] - 48][s[i] - 48]);
    }
    printf("\n");
  }
  return 0;
}
