#include <iostream>
#include <cstdio>
#include <string.h>
using namespace std;

char change(char a, char b) {
  char ans;
  if(a == '1' && b == '1') ans = 'a';
  if(a == '1' && b == '2') ans = 'b';
  if(a == '1' && b == '3') ans = 'c';
  if(a == '1' && b == '4') ans = 'd';
  if(a == '1' && b == '5') ans = 'e';
  if(a == '2' && b == '1') ans = 'f';
  if(a == '2' && b == '2') ans = 'g';
  if(a == '2' && b == '3') ans = 'h';
  if(a == '2' && b == '4') ans = 'i';
  if(a == '2' && b == '5') ans = 'j';
  if(a == '3' && b == '1') ans = 'k';
  if(a == '3' && b == '2') ans = 'l';
  if(a == '3' && b == '3') ans = 'm';
  if(a == '3' && b == '4') ans = 'n';
  if(a == '3' && b == '5') ans = 'o';
  if(a == '4' && b == '1') ans = 'p';
  if(a == '4' && b == '2') ans = 'q';
  if(a == '4' && b == '3') ans = 'r';
  if(a == '4' && b == '4') ans = 's';
  if(a == '4' && b == '5') ans = 't';
  if(a == '5' && b == '1') ans = 'u';
  if(a == '5' && b == '2') ans = 'v';
  if(a == '5' && b == '3') ans = 'w';
  if(a == '5' && b == '4') ans = 'x';
  if(a == '5' && b == '5') ans = 'y';
  if(a == '6' && b == '1') ans = 'z';
  if(a == '6' && b == '2') ans = '.';
  if(a == '6' && b == '3') ans = '?';
  if(a == '6' && b == '4') ans = '!';
  if(a == '6' && b == '5') ans = ' ';
  return ans;
}

int main(void) {
  char c[200];
  char ans[100];
  int len = 0;
  while(scanf("%s", c) != EOF) {
    int cnt = 0;
    len = strlen(c);
    for(int i = 0 ; i < len ; i+=2) {
      ans[i] = change(c[i], c[i+1]);
    }
    if(len % 2 == 0) {
      for(int i = 0 ; i < len ; i+=2) {
	cout << ans[i];
      }
      cout << endl;
    }
    else cout << "NA" << endl;
  }
  return 0;
}