#include <bits/stdc++.h>
using namespace std;
char m[6][5] = {{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
                {'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
                {'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
char f(int i, int j) { return m[i][j]; }
int main() {
  string s;
  while (cin >> s) {
    string ans;
    bool flag = false;
    if (s.size() % 2) {
      flag = true;
    } else {
      for (int i = 1; i < s.size(); i += 2) {
        int y = s[i - 1] - '0' - 1;
        int x = s[i] - '0' - 1;
        if (y < 0 || x < 0 || y >= 6 || x >= 5) {
          flag = true;
          break;
        }
        ans.push_back(f(y, x));
      }
      if (flag)
        cout << "NA" << endl;
      else
        cout << ans << endl;
    }
  }
}
