#include <bits/stdc++.h>
using namespace std;
int main() {
  string table[6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  string s;
  int a, b;
  while (cin >> s) {
    if (cin.eof()) break;
    int flg = 0;
    string ans;
    if (s.size() % 2) {
      cout << "NA" << endl;
    } else {
      for (int i = 0; i < s.size(); i += 2) {
        if ((s[i] >= '1') && (s[i] <= '6') && (s[i + 1] >= '1') &&
            (s[i + 1] <= '5')) {
          a = s[i] - '0' - 1;
          b = s[i + 1] - '0' - 1;
          flg = 1;
          ans += table[a][b];
        }
      }
      if (flg) {
        cout << ans << endl;
      } else {
        cout << "NA" << endl;
      }
    }
  }
  return 0;
}
