#include <bits/stdc++.h>
using namespace std;
char s[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main(void) {
  string str;
  while (cin >> str) {
    if (str.length() % 2 == 1) {
      cout << "NA\n";
      continue;
    }
    string ans = "";
    bool flg = false;
    for (int i = 0; i < str.length(); i += 2) {
      int a = str[i] - '1';
      int b = str[i + 1] - '1';
      if (a >= 6 || b >= 5) {
        cout << "NA\n";
        flg = true;
        break;
      } else {
        ans += s[a][b];
      }
    }
    if (flg) continue;
    cout << ans << endl;
  }
  return 0;
}
