/*
AizuOnline A0127
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
char msg[401];
char cvtmsg[201];
//
conv(char n1,char n2)
{
  int r;
  if(n1 < '0' || n1 > '6' ||n2 < '0' ||n2 > '5')
    return(-1);
  r = ((n1-'0')-1)*5+(n2-'0'-1);
  if(r < 26)
    return('a'+r);
  else 
    return(".?! "[(n2-'2')]);
}
main()
{
  int i,j,l;
  char cvt;

  while(EOF!=scanf("%s ",msg))
    {
      memset(cvtmsg,0,sizeof(cvtmsg));
      l=strlen(msg);
      if((l % 2)==1)
	goto NA;
      for(i=0,j=0;i<l;i+=2)
	{
	  cvt=conv(msg[i],msg[i+1]);
	  if(cvt==-1)
	    goto NA;
	  cvtmsg[j++]=cvt;
	}
      cvtmsg[j]=0;
    
      printf("%s\n",cvtmsg);
      continue;
NA:
      printf("NA\n");
    }
return(0);
}