#include <bits/stdc++.h>
using namespace std;
int main() {
  string abc = "abcdefghijklmnopqrstuvwxyz.?! ";
  string b;
  while (cin >> b) {
    if (b.size() % 2 != 0) {
      cout << "NA" << endl;
    } else {
      for (int i = 0; i < b.size(); i++) {
        int p = b[i] - '0';
        int q = b[i + 1] - '0';
        cout << abc[5 * (p - 1) + q - 1];
        i++;
      }
      cout << endl;
    }
  }
  return 0;
}
