#include <bits/stdc++.h>
using namespace std;
int main() {
  string a = "abcdefghijklmnopqrstuvwxyz.?! ";
  string b;
  while (cin >> b) {
    if (b.length() % 2 == 1) {
      cout << "NA" << endl;
      goto stop;
    }
    for (int i = 0; i < b.length(); i += 2) {
      int c, d;
      c = (int)b[i] - '1';
      d = (int)b[i + 1] - '0';
      int e = c * 5 + d;
      cout << a[e - 1];
    }
    cout << endl;
  stop:;
  }
}
