#include <iostream>
#include <algorithm>
using namespace std;

const string T= "abcdefghijklmnopqrstuvwxyz.?! ";

string conv(const string &s) {
  int n = s.size();
  if(n % 2 != 0) return "NA";
  string res;
  for(int i = 0; i < n; i += 2) {
    int a = s[i] - '0';
    int b = s[i+1] - '0';
    if(1 <= a && a <= 6) ; else return "NA";
    if(1 <= b && b <= 5) ; else return "NA";
    int k = (a-1)*5 + (b-1);
    res += T[k];
  }
  return res;
}

int main() {
  string s;
  while(cin >> s) {
    cout << conv(s) << endl;
  }
  return 0;
}