#include <bits/stdc++.h>
int main(void) {
  char str[1000];
  int i;
  while (scanf("%s", str) != EOF) {
    i = 0;
    while (str[i] != '\0') {
      if (str[i] == '1') {
        if (str[i + 1] == '1') {
          printf("a");
          i = i + 2;
        } else if (str[i + 1] == '2') {
          printf("b");
          i = i + 2;
        } else if (str[i + 1] == '3') {
          printf("c");
          i = i + 2;
        } else if (str[i + 1] == '4') {
          printf("d");
          i = i + 2;
        } else if (str[i + 1] == '5') {
          printf("e");
          i = i + 2;
        } else {
          printf("NA");
          break;
        }
      } else if (str[i] == '2') {
        if (str[i + 1] == '1') {
          printf("f");
          i = i + 2;
        } else if (str[i + 1] == '2') {
          printf("g");
          i = i + 2;
        } else if (str[i + 1] == '3') {
          printf("h");
          i = i + 2;
        } else if (str[i + 1] == '4') {
          printf("i");
          i = i + 2;
        } else if (str[i + 1] == '5') {
          printf("j");
          i = i + 2;
        } else {
          printf("NA");
          break;
        }
      } else if (str[i] == '3') {
        if (str[i + 1] == '1') {
          printf("k");
          i = i + 2;
        } else if (str[i + 1] == '2') {
          printf("l");
          i = i + 2;
        } else if (str[i + 1] == '3') {
          printf("m");
          i = i + 2;
        } else if (str[i + 1] == '4') {
          printf("n");
          i = i + 2;
        } else if (str[i + 1] == '5') {
          printf("o");
          i = i + 2;
        } else {
          printf("NA");
          break;
        }
      } else if (str[i] == '4') {
        if (str[i + 1] == '1') {
          printf("p");
          i = i + 2;
        } else if (str[i + 1] == '2') {
          printf("q");
          i = i + 2;
        } else if (str[i + 1] == '3') {
          printf("r");
          i = i + 2;
        } else if (str[i + 1] == '4') {
          printf("s");
          i = i + 2;
        } else if (str[i + 1] == '5') {
          printf("t");
          i = i + 2;
        } else {
          printf("NA");
          break;
        }
      } else if (str[i] == '5') {
        if (str[i + 1] == '1') {
          printf("u");
          i = i + 2;
        } else if (str[i + 1] == '2') {
          printf("v");
          i = i + 2;
        } else if (str[i + 1] == '3') {
          printf("w");
          i = i + 2;
        } else if (str[i + 1] == '4') {
          printf("x");
          i = i + 2;
        } else if (str[i + 1] == '5') {
          printf("y");
          i = i + 2;
        } else {
          printf("NA");
          break;
        }
      } else if (str[i] == '6') {
        if (str[i + 1] == '1') {
          printf("z");
          i = i + 2;
        } else if (str[i + 1] == '2') {
          printf(".");
          i = i + 2;
        } else if (str[i + 1] == '3') {
          printf("?");
          i = i + 2;
        } else if (str[i + 1] == '4') {
          printf("!");
          i = i + 2;
        } else if (str[i + 1] == '5') {
          printf(" ");
          i = i + 2;
        } else {
          printf("NA");
          break;
        }
      } else {
        printf("NA");
        break;
      }
    }
    printf("\n");
  }
  return 0;
}
