#include<cstdio>
#include<cstring>
using namespace std;
int main(){
  char c[201];
  char hyou[6][7];
  hyou[1][6] = 'z';
  hyou[2][6] = '.';
  hyou[3][6] = '?';
  hyou[4][6] = '!';
  hyou[5][6] = ' ';
  for(int i=1;i<=5;i++){
    for(int j=1;j<=5;j++){
      hyou[i][j] = 'a'+(j-1)*5+i-1;
    }
  }
  
  while(scanf("%s",c) != EOF){
    if(strlen(c)%2 != 0){
      printf("NA\n");
      continue;
    }
    for(int i=0;i<strlen(c);i+=2){
      printf("%c",hyou[c[i+1]-'0'][c[i]-'0']);
    } putchar('\n');
  }

  return (0);
}