#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
int main() {
  string st;
  while (getline(cin, st)) {
    string ans;
    bool ok = true;
    if (st.size() % 2) ok = false;
    for (int i = 0; i < st.size() / 2; ++i) {
      string ast = st.substr(2 * i, 2);
      int num = (ast[0] - '1') * 5 + (ast[1] - '1');
      if (num <= 25)
        ans += 'a' + num;
      else if (num == 26)
        ans += '.';
      else if (num == 27)
        ans += '?';
      else if (num == 28)
        ans += '!';
      else if (num == 29)
        ans += " ";
      else {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << ans << endl;
    } else {
      cout << "NA" << endl;
    }
  }
  return 0;
}
