#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-10;
static const double PI = acos(-1.0);
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const long long LL_INF = 1152921504606846976;
static const int dx[] = {-1, 0, 1, 0, 1, -1, 1, -1};
static const int dy[] = {0, -1, 0, 1, 1, 1, -1, -1};
char c[6][5] = {
    {'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
    {'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
    {'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '},
};
int main() {
  string s;
  while (cin >> s) {
    if (s.size() % 2) {
      printf("NA\n");
      continue;
    }
    string ans = "";
    for (int i = 0; i < s.size(); i += 2) {
      if (s[i] < '1' || '6' < s[i] || s[i + 1] < '1' || '6' < s[i + 1]) {
        printf("NA\n");
        break;
      }
      ans += c[s[i] - '1'][s[i + 1] - '1'];
    }
    if (ans.size() != s.size() / 2) {
      continue;
    }
    printf("%s\n", ans.c_str());
  }
  return 0;
}
