#include <bits/stdc++.h>
const char symbol[4] = {'.', '?', '!', ' '};
int main() {
  std::string s;
  while (std::cin >> s) {
    std::string res;
    bool f = true;
    if (s.size() & 1) f = false;
    if (f) {
      for (int i = 0; i < s.size(); i += 2) {
        if (s[i] < '0' || s[i] > '9' || s[i + 1] < '0' || s[i + 1] > '9') {
          f = false;
          break;
        }
        int n = (s[i] - '1') * 5 + s[i + 1] - '1';
        if (n > 29) {
          f = false;
          break;
        } else
          res += n >= 26 ? symbol[n - 26] : 'a' + n;
      }
    }
    std::cout << (f ? res : "NA") << std::endl;
  }
  return 0;
}
