#include <bits/stdc++.h>
int main(void) {
  int i, a, b;
  int mode;
  char str[210];
  char ans[105];
  while (scanf("%s", str) != EOF) {
    mode = 0;
    for (i = 0; str[i] != 0; i++) {
      if (str[i] < '1' || '6' < str[i]) {
        mode = 1;
        break;
      }
      if (mode == 0) {
        a = str[i] - '0';
        mode = 1;
      } else {
        if (str[i] == '6') {
          puts("X");
          break;
        }
        b = str[i] - '0';
        switch (a) {
          case 1:
            ans[i / 2] = 'a' + b - 1;
            break;
          case 2:
            ans[i / 2] = 'f' + b - 1;
            break;
          case 3:
            ans[i / 2] = 'k' + b - 1;
            break;
          case 4:
            ans[i / 2] = 'p' + b - 1;
            break;
          case 5:
            ans[i / 2] = 'u' + b - 1;
            break;
          case 6:
            ans[i / 2] = b == 1   ? 'z'
                         : b == 2 ? '.'
                         : b == 3 ? '?'
                         : b == 4 ? '!'
                                  : ' ';
            break;
        }
        mode = 0;
      }
    }
    ans[i / 2] = 0;
    if (mode == 1) {
      puts("NA");
    } else {
      puts(ans);
    }
  }
  return 0;
}
