#include <bits/stdc++.h>
using namespace std;
int main() {
  char field[6][11];
  char a = 'a';
  for (int i = 1; i < 7; i++) {
    for (int j = 1; j < 6; j++) {
      field[j][i] = a;
      a++;
    }
  }
  field[2][6] = '.';
  field[3][6] = '?';
  field[4][6] = '!';
  field[5][6] = ' ';
  string input;
  while (cin >> input) {
    string ans;
    bool isCorrect = true;
    if (input.size() % 2 == 1) {
      isCorrect = false;
      continue;
    } else {
      for (int i = 0; i < input.size(); i += 2) {
        int n = atoi(input.substr(i, 1).c_str());
        int m = atoi(input.substr(i + 1, 1).c_str());
        if (!(1 <= m && m <= 5 && 1 <= n && n <= 6)) isCorrect = false;
        ans += field[m][n];
      }
    }
    if (isCorrect)
      cout << ans << endl;
    else
      cout << "NA" << endl;
  }
}
