#include <bits/stdc++.h>
using namespace std;
int main() {
  const char r[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', '.', '?', '!', ' '}};
  string s;
  while (cin >> s) {
    string str;
    bool b = true;
    if (s.size() % 2 == 1) {
      b = false;
    } else
      for (int i = 0; i < s.size(); i += 2) {
        int a, bc;
        a = s[i] - '0';
        bc = s[i + 1] - '0';
        if (a >= 7 || bc >= 6) {
          b = false;
        } else
          str += r[a - 1][bc - 1];
      }
    if (b) {
      cout << str << endl;
    } else
      cout << "NA" << endl;
  }
}
