#include <bits/stdc++.h>
using namespace std;
int main() {
  char zu[6][5];
  string bun;
  char x = 'a';
  int nagasa;
  int smp1, smp2;
  for (int i = 0; i < 6; i++) {
    for (int j = 0; j < 5; j++) {
      zu[i][j] = x;
      x++;
    }
  }
  zu[5][1] = '.';
  zu[5][2] = '?';
  zu[5][3] = '!';
  zu[5][4] = ' ';
  while (cin >> bun) {
    nagasa = bun.size();
    int flag = 0;
    for (int i = 0; i < nagasa; i = i + 2) {
      smp1 = bun[i] - '0' - 1;
      smp2 = bun[i + 1] - '0' - 1;
      if (smp1 > 5 || smp2 > 4 || smp1 <= 0 || smp2 <= 0) {
        flag = 1;
      }
    }
    int a = nagasa % 2;
    if (a == 0 && flag == 0) {
      for (int i = 0; i < nagasa; i = i + 2) {
        smp1 = bun[i] - '0' - 1;
        smp2 = bun[i + 1] - '0' - 1;
        cout << zu[smp1][smp2];
      }
      cout << endl;
    } else {
      cout << "NA" << endl;
    }
  }
}
