#include<stdio.h>
#include<string.h>
#include <sstream>
#include <cstdlib>
using namespace std;

int main(){

  char s[402],G[5][7]={'a','f','k','p','u','z','\0','b','g','l','q','v','.','\0','c','h','m','r','w','?','\0','d','i','n','s','x','!','\0','e','j','o','t','y','&','\0'};
  int i,j,temp,a,b,c;

  


  while(scanf("%s", s)!= EOF){
     temp = strlen(s);
     c=0;
     if(temp==0) continue;
     if(temp %2 == 0) {
       for(i=0;;i+=2){
	 if(s[i]=='\0' || s[i+1]=='\0') break;
	 if(s[i]-'0'<1 || s[i]-'0'>6) c=1;
	 if(s[i+1]-'0'<1 || s[i+1]-'0'>5) c=1;
       }
       if(c==1){
	 printf("NA\n");
	 continue;
       }
       for(i=0; i<temp; i+=2){
	 //a = atoi(s[i+1]);
	 //b = atoi(s[i]);
	 a=s[i+1]-'0';
	 b=s[i]-'0';
	 if(G[a-1][b-1] == '&') printf(" ");
	 else printf("%c",G[a-1][b-1]);
       }
     }else printf("NA");
     printf("\n");
  }
  return 0;
}