#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
signed main() {
  string A[] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  for (string s; cin >> s;) {
    if (s.size() % 2) {
      cout << "NA" << endl;
      continue;
    }
    bool flag = false;
    string ans = "";
    for (int i = 0; i < s.size(); i += 2) {
      if (s[i] > '6' || s[i + 1] > '5') {
        cout << "NA" << endl;
        flag = true;
        break;
      }
      ans += A[s[i] - '1'][s[i + 1] - '1'];
    }
    if (flag) {
      continue;
    }
    cout << ans << endl;
  }
  return 0;
}
