#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
char num[256];
char decode[][7] = {{0, 0, 0, 0, 0},
                    {0, 'a', 'b', 'c', 'd', 'e'},
                    {0, 'f', 'g', 'h', 'i', 'j'},
                    {0, 'k', 'l', 'm', 'n', 'o'},
                    {0, 'p', 'q', 'r', 's', 't'},
                    {0, 'u', 'v', 'w', 'x', 'y'},
                    {0, 'z', '.', '?', '!', ' '}};
string change() {
  if (strlen(num) % 2 == 1) return "NA";
  string ans = "";
  for (int i = 0; i < strlen(num); i += 2) {
    if (num[i] == '0' || num[i + 1] == '0' || num[i] > '6' || num[i + 1] > '6')
      return "NA";
    ans += decode[num[i] - 48][num[i + 1] - 48];
  }
  return ans;
}
int main() {
  while (~scanf("%s", num)) {
    cout << change() << endl;
  }
  return 0;
}
