#include <bits/stdc++.h>
using namespace std;
template <class T>
inline string toStr(T a) {
  ostringstream oss_;
  oss_ << a;
  return oss_.str();
}
inline int toInt(string s) { return atoi(s.c_str()); }
bool isPrime(int a) {
  for (int i = 2; i * i <= a; i++)
    if (a % i == 0) return false;
  return true;
}
int const dx[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int const dy[] = {0, -1, 0, 1, -1, -1, 1, 1};
int main() {
  string s;
  while (cin >> s) {
    int const N = s.size();
    if (N % 2) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < N; i += 2) {
      int a = s[i] - '0' - 1;
      if (!(0 <= a && a < 6)) {
        cout << "NA" << endl;
        goto EXIT;
      }
      int b = s[i + 1] - '0' - 1;
      if (!(0 <= b && b < 5)) {
        cout << "NA" << endl;
        goto EXIT;
      }
      char ch = (char)('a' + a * 5 + b);
      if (!('a' <= ch && ch < 'z' + 1)) {
        if (b == 1 && a == 5) ch = '.';
        if (b == 2 && a == 5) ch = '?';
        if (b == 3 && a == 5) ch = '!';
        if (b == 4 && a == 5) ch = ' ';
      }
      cout << ch;
    }
    cout << endl;
  EXIT:;
  }
  return 0;
}
