#include <iostream>
#include <string>
#include <sstream>

using namespace std;


int main() {
  string str;
  while(getline(cin, str)) {
    stringstream sin;
    bool flag = true;
    if((int)str.length() % 2 == 0) {
      for(int i = 0; i < str.length(); i+=2) {
	int tm1 = (int)str[i] - (int)'0';
	int tm2 = (int)str[i+1] - (int)'0';

	if(!(tm1 >= 1 && tm1 <= 6 && tm2 >= 1 && tm2 <= 5)) {
	  flag = false;
	  break;
	}
	char c;
	if(tm1 == 6 && tm2 >= 2) {
	  switch(tm2) {
	  case 2:
	    c = '.'; break;
	  case 3:
	    c = '?'; break;
	  case 4:
	    c = '!'; break;
	  case 5:
	    c = ' '; break;
	  }
	} else {
	  c = (char)((tm1-1) * 5 + tm2 - 1 + (int)'a');
	}
	sin << c;
      }
    } else {
      flag = false;
    }

    if(!flag) {
      cout << "NA" << endl;
    } else {
      cout << sin.str() << endl;
    }
  }
  return 0;
}