#include <bits/stdc++.h>
using namespace std;
int main() {
  char tb[9][9];
  for (int i = 1; i <= 7; i++)
    for (int j = 1; j <= 6; j++) tb[i][j] = 'a' + (5 * (i - 1) + j - 1);
  tb[6][2] = '.';
  tb[6][3] = '?';
  tb[6][4] = '!';
  tb[6][5] = ' ';
  string b;
  while (cin >> b) {
    string res;
    bool g = true;
    if (b.size() % 2 == 1)
      g = false;
    else {
      for (int i = 0; i < b.size(); i += 2) {
        int f = b[i] - '0', s = b[i + 1] - '0';
        if (f < 1 && f > 6 || s < 1 && s > 5) {
          g = false;
          break;
        }
        res += tb[f][s];
      }
    }
    if (g)
      cout << res << endl;
    else
      cout << "NA" << endl;
  }
}
