#include <iostream>
#include <string>

using namespace std;

int main(void){
  string arg;

  while(cin >> arg){
	int n=arg.size();
	int tmpi;
	char tmpc;
	string str = "";
	bool ok = true;
	if(n%2==1){
	  cout << "NA" << endl;
	  continue;
	}
	for(int i=0;i<n/2;i++){
	  tmpi = 0;
	  tmpc = arg[i*2];
	  tmpi += (tmpc - '0') * 10;
	  tmpc = arg[i*2+1];
	  tmpi += tmpc - '0';
	  switch(tmpi){
	  case 11:
		str +="a";
		break;
	  case 12:
		str +="b";
		break;
	  case 13:
		str +="c";
		break;
	  case 14:
		str +="d";
		break;
	  case 15:
		str +="e";
		break;
	  case 21:
		str +="f";
		break;
	  case 22:
		str +="g";
		break;
	  case 23:
		str +="h";
		break;
	  case 24:
		str +="i";
		break;
	  case 25:
		str +="j";
		break;
	  case 31:
		str +="k";
		break;
	  case 32:
		str +="l";
		break;
	  case 33:
		str +="m";
		break;
	  case 34:
		str +="n";
		break;
	  case 35:
		str +="o";
		break;
	  case 41:
		str +="p";
		break;
	  case 42:
		str +="q";
		break;
	  case 43:
		str +="r";
		break;
	  case 44:
		str +="s";
		break;
	  case 45:
		str +="t";
		break;
	  case 51:
		str +="u";
		break;
	  case 52:
		str +="v";
		break;
	  case 53:
		str +="w";
		break;
	  case 54:
		str +="x";
		break;
	  case 55:
		str +="y";
		break;
	  case 61:
		str +="z";
		break;
	  case 62:
		str +=".";
		break;
	  case 63:
		str +="?";
		break;
	  case 64:
		str +="!";
		break;
	  case 65:
		str +=" ";
		break;
	  default:
		ok = false;
	  }
	  if(!ok) break;
	}
	if(ok){
	  cout << str << endl;
	}else{
	  cout << "NA" << endl;
	}
  }
}