#include <bits/stdc++.h>
using namespace std;
char change(char a, char b) {
  char ans;
  if (a == '1' && b == '1')
    ans = 'a';
  else if (a == '1' && b == '2')
    ans = 'b';
  else if (a == '1' && b == '3')
    ans = 'c';
  else if (a == '1' && b == '4')
    ans = 'd';
  else if (a == '1' && b == '5')
    ans = 'e';
  else if (a == '2' && b == '1')
    ans = 'f';
  else if (a == '2' && b == '2')
    ans = 'g';
  else if (a == '2' && b == '3')
    ans = 'h';
  else if (a == '2' && b == '4')
    ans = 'i';
  else if (a == '2' && b == '5')
    ans = 'j';
  else if (a == '3' && b == '1')
    ans = 'k';
  else if (a == '3' && b == '2')
    ans = 'l';
  else if (a == '3' && b == '3')
    ans = 'm';
  else if (a == '3' && b == '4')
    ans = 'n';
  else if (a == '3' && b == '5')
    ans = 'o';
  else if (a == '4' && b == '1')
    ans = 'p';
  else if (a == '4' && b == '2')
    ans = 'q';
  else if (a == '4' && b == '3')
    ans = 'r';
  else if (a == '4' && b == '4')
    ans = 's';
  else if (a == '4' && b == '5')
    ans = 't';
  else if (a == '5' && b == '1')
    ans = 'u';
  else if (a == '5' && b == '2')
    ans = 'v';
  else if (a == '5' && b == '3')
    ans = 'w';
  else if (a == '5' && b == '4')
    ans = 'x';
  else if (a == '5' && b == '5')
    ans = 'y';
  else if (a == '6' && b == '1')
    ans = 'z';
  else if (a == '6' && b == '2')
    ans = '.';
  else if (a == '6' && b == '3')
    ans = '?';
  else if (a == '6' && b == '4')
    ans = '!';
  else if (a == '6' && b == '5')
    ans = ' ';
  return ans;
}
int main(void) {
  char c[201];
  char ans[201];
  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;
}
