#include <bits/stdc++.h>
using namespace std;
int main() {
  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', '.', '?', '!', ' '}};
  string s;
  while (cin >> s) {
    string ans = "";
    if (s.size() % 2 == 0) {
      for (int i = 0; i < s.size(); i += 2) {
        if (s[i] >= '1' && s[i] <= '6' && s[i + 1] >= '1' && s[i + 1] <= '6')
          ans += c[s[i] - '0' - 1][s[i + 1] - '0' - 1];
        else
          goto L;
      }
      cout << ans << endl;
    } else
    L:
      cout << "NA" << endl;
  }
}
