#include <bits/stdc++.h>
using namespace std;
void swap(int &a, int &b) {
  int w = a;
  a = b;
  b = w;
}
int getdigit(int num) {
  int i, j;
  if (num < 0) num *= -1;
  if (num == 0) return 1;
  for (i = 10, j = 1;; i *= 10, j++) {
    if (((i / 10 <= num && num <= i - 1) ? (1) : (0))) return j;
  }
  return 0;
}
int getN(int num, int digit) {
  int i = 1, j;
  for (j = 1; j < digit; i *= 10, j++)
    ;
  return (num / i) % 10;
}
int zeller(int y, int m, int d) {
  if (m < 3) {
    y--;
    m += 12;
  }
  return (y + y / 4 - y / 100 + y / 400 + (13 * m + 8) / 5 + d) % 7;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
int stoi(const string str) {
  int i = 0, j;
  int len = str.length();
  int w = 0;
  for (i = 1, j = 1;
       i <= len && (('0' <= str[len - i] && str[len - i] <= '9') ? (1) : (0));
       i++, j *= 10) {
    w += (str[len - i] - '0') * j;
  }
  if (str[0] == '-') w *= -1;
  return w;
}
string itos(int a) {
  int i;
  string str = "";
  int keta;
  if (a < 0) {
    str += '-';
    a *= -1;
  }
  for (keta = 10; a / keta != 0; keta *= 10)
    ;
  for (i = keta / 10; i != 0; i /= 10) {
    str += ((a / i) % 10) + '0';
  }
  return str;
}
char kaezi[100][100] = {{"XXXXXXX"}, {"Xabcde"}, {"Xfghij"}, {"Xklmno"},
                        {"Xpqrst"},  {"Xuvwxy"}, {"Xz.?! "}};
int main(void) {
  string str;
  string det;
  int i, j;
  while (cin >> str) {
    det = "";
    for (i = 0; i < str.length(); i += 2) {
      if ((('1' <= str[i] && str[i] <= '6') ? (1) : (0)) &&
          (('1' <= str[i + 1] && str[i + 1] <= '6') ? (1) : (0))) {
        det += kaezi[str[i] - '0'][str[i + 1] - '0'];
      } else {
        det = "NA";
        break;
      }
    }
    cout << det << endl;
  }
  return 0;
}
