#include <iostream>
#include <string>
using namespace std;

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

  string a = "\0";
  while (getline(cin, a)) {
    int len = 0;
    for (int i = 0; a[i] != '\0'; i++)
      len++;

    if (len % 2) {
      cout << "NA" << endl;
      continue;
    }
    int count = 0;
    int count2 = 0;
    char ans[100] = {'\0'};
    while (count < len) {
      if (a[count] > 6 + '0' || a[count + 1] > 5 + '0' || a[count] < '1'
	  || a[count + 1] < '1') {
	cout << "NA" << endl;
	goto loop_end;
      }
      ans[count2] = table[a[count + 1] - '0' - 1][a[count] - '0' - 1];
      count += 2;
      count2++;
    }
    cout << ans << endl;
  loop_end: ;
    a = "\0";
  }
}