#include <bits/stdc++.h>
using namespace std;
char table[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 str;
  bool na;
  string result;
  while (cin >> str) {
    result = "";
    na = false;
    if (str.size() % 2) {
      na = true;
    } else {
      for (int i = 0; i < str.size(); i += 2) {
        int col = str.at(i) - '0' - 1;
        int row = str.at(i + 1) - '0' - 1;
        if (col < 0 || col > 6 || row < 0 || row > 5) {
          na = true;
        } else {
          result += table[col][row];
        }
      }
    }
    if (na == true) {
      cout << "NA" << endl;
    } else {
      cout << result << endl;
    }
  }
  return 0;
}
