#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
inline int readInt() {
  int x;
  scanf("%d", &x);
  return x;
}
struct Edge {
  int to, cost;
  Edge(int to, int cost) : to(to), cost(cost) {}
};
vector<vector<Edge>> graph;
const int INF = 100000000;
int main() {
  map<pair<int, int>, char> mp;
  for (int i = 0; i < 6; ++i) {
    for (int j = 0; j < 6; ++j) {
      mp[{i + 1, j + 1}] = ('a' + i * 5 + j);
    }
  }
  mp[{6, 1}] = 'z';
  mp[{6, 2}] = '.';
  mp[{6, 3}] = '?';
  mp[{6, 4}] = '!';
  mp[{6, 5}] = ' ';
  string s;
  while (cin >> s) {
    if ((int)s.size() % 2 == 1) {
      cout << "NA" << endl;
      continue;
    }
    bool f = false;
    for (int i = 0; i < s.size(); i += 2) {
      if (mp.find({s[i] - '0', s[i + 1] - '0'}) == mp.end()) f = true;
    }
    if (f) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < s.size(); i += 2) {
      cout << mp[{s[i] - '0', s[i + 1] - '0'}];
    }
    cout << endl;
  }
  return 0;
}
