#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (cin >> s) {
    if (s.size() % 2 != 0) {
      printf("NA\n");
      continue;
    }
    int now = 0;
    while (now < s.size()) {
      int a = s[now] - '0', b = s[now + 1] - '0';
      int p = (a - 1) * 5 + b - 1;
      if (p <= 25)
        printf("%c", p + 'a');
      else if (p == 26)
        printf(".");
      else if (p == 27)
        printf("?");
      else if (p == 28)
        printf("!");
      else if (p == 29)
        printf(" ");
      now += 2;
    }
    printf("\n");
  }
  return 0;
}
