#include<stdio.h>
#include<string.h>


int main(){
	char out[300],in[300];
	int i,j,a,b;
	
	while(~scanf(" %s ",in)){
		i=0;
		j=0;
		for(i=0;;i++){
			if(in[i]=='\0')break;
			if(i%2==1 && in[i]>'5')j=1;
			if(in[i]<='0' || in[i]>'6')j=1;
		}
		
		if(i%2==1 || j==1){
			printf("NA\n");
			continue;
		}
		
		for(i=0;;i+=2){
			if(in[i]=='\0')break;
			if(in[i]=='6'){
				switch(in[i+1]){
				case '1':
					out[j]='z';
					break;
				case '2':
					out[j]='.';
					break;
				case '3':
					out[j]='?';
					break;
				case '4':
					out[j]='!';
					break;
				case '5':
					out[j]=' ';
					break;
				}
			}else{
				out[j]=(in[i]-'1')*5+in[i+1]-'1'+'a';
			}
			++j;
			out[j]='\0';
		}
		printf("%s\n",out);
	}
	return 0;
}