#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string str;
  while (cin >> str) {
    int n = str.size();
    int tmpi;
    char tmpc;
    if (n % 2 == 1) {
      cout << "NA" << endl;
      continue;
    }
    for (int i = 0; i < n / 2; i++) {
      tmpi = 0;
      tmpc = str[i * 2];
      tmpi += (tmpc - '0') * 10;
      tmpc = str[i * 2 + 1];
      tmpi += tmpc - '0';
      switch (tmpi) {
        case 11:
          cout << "a";
          break;
        case 12:
          cout << "b";
          break;
        case 13:
          cout << "c";
          break;
        case 14:
          cout << "d";
          break;
        case 15:
          cout << "e";
          break;
        case 21:
          cout << "f";
          break;
        case 22:
          cout << "g";
          break;
        case 23:
          cout << "h";
          break;
        case 24:
          cout << "i";
          break;
        case 25:
          cout << "j";
          break;
        case 31:
          cout << "k";
          break;
        case 32:
          cout << "l";
          break;
        case 33:
          cout << "m";
          break;
        case 34:
          cout << "n";
          break;
        case 35:
          cout << "o";
          break;
        case 41:
          cout << "p";
          break;
        case 42:
          cout << "q";
          break;
        case 43:
          cout << "r";
          break;
        case 44:
          cout << "s";
          break;
        case 45:
          cout << "t";
          break;
        case 51:
          cout << "u";
          break;
        case 52:
          cout << "v";
          break;
        case 53:
          cout << "w";
          break;
        case 54:
          cout << "x";
          break;
        case 55:
          cout << "y";
          break;
        case 61:
          cout << "z";
          break;
        case 62:
          cout << ".";
          break;
        case 63:
          cout << "?";
          break;
        case 64:
          cout << "!";
          break;
        case 65:
          cout << " ";
          break;
      }
    }
    cout << endl;
  }
}
