#include <bits/stdc++.h>
using namespace std;
int main() {
  char data[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  string s;
  while (cin >> s) {
    string ans;
    if (s.size() % 2 != 0) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < s.size(); i += 2) {
      int x = s[i] - '1', y = s[i + 1] - '1';
      if (x < 0 || x >= 6 || y < 0 || y >= 5) {
        cout << "NA" << endl;
        continue;
      }
      ans += data[x][y];
    }
    cout << ans << endl;
  }
}
