#include<iostream>
using namespace std;

int main(){
  string mes;
  char code[6][5] = { {'a','b','c','d','e'},
		      {'f','g','h','i','j'},
		      {'k','l','m','n','o'},
		      {'p','q','r','s','t'},
		      {'u','v','w','x','y'},
		      {'z','.','?','!',' '} };

  while(cin>>mes){
    string ans;
    bool f = true;
    if(mes.size()&1)f = false;
    else{
      for(int i=0;i<(int)mes.size();i+=2){
	int c = mes[i]-'0'-1, r = mes[i+1]-'0'-1;
	if(c<0 || r<0 || c>=6 || r>=5){
	  f = false;
	  break;
	}
	ans += code[c][r];
      }
    }
    if(f)cout << ans << endl;
    else cout << "NA" << endl;
  }
}