#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

map<string, char> mp;

void init() {
  mp["11"] = 'a';
  mp["12"] = 'b';
  mp["13"] = 'c';
  mp["14"] = 'd';
  mp["15"] = 'e';
  mp["21"] = 'f';
  mp["22"] = 'g';
  mp["23"] = 'h';
  mp["24"] = 'i';
  mp["25"] = 'j';
  mp["31"] = 'k';
  mp["32"] = 'l';
  mp["33"] = 'm';
  mp["34"] = 'n';
  mp["35"] = 'o';
  mp["41"] = 'p';
  mp["42"] = 'q';
  mp["43"] = 'r';
  mp["44"] = 's';
  mp["45"] = 't';
  mp["51"] = 'u';
  mp["52"] = 'v';
  mp["53"] = 'w';
  mp["54"] = 'x';
  mp["55"] = 'y';
  mp["61"] = 'z';
  mp["62"] = '.';
  mp["63"] = '?';
  mp["64"] = '!';
  mp["65"] = ' ';
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  init();
  string s;
  while (cin >> s) {
    string ans = "";
    int sz = s.size(), na = sz & 1;
    for (int i = 0; i < sz; i += 2) {
      string t = s.substr(i, 2);
      na |= mp.find(t) == mp.end();
      ans += mp[s.substr(i, 2)];
    }
    cout << (na ? "NA" : ans) << endl;
  }

  return 0;
}
