#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, ans;
  while (cin >> s) {
    int i = 0;
    char a;
    ans = "";
    while (i < s.size()) {
      if (s.size() % 2) {
        ans = "NA";
        break;
      }
      if (s[i] == '1') {
        a = ('a' - 1) + (s[i + 1] - '0');
      } else if (s[i] == '2') {
        a = ('f' - 1) + (s[i + 1] - '0');
      } else if (s[i] == '3') {
        a = ('k' - 1) + (s[i + 1] - '0');
      } else if (s[i] == '4') {
        a = ('p' - 1) + (s[i + 1] - '0');
      } else if (s[i] == '5') {
        a = ('u' - 1) + (s[i + 1] - '0');
      } else if (s[i] == '6') {
        if (s[i + 1] == '1')
          a = 'z';
        else if (s[i + 1] == '2')
          a = '.';
        else if (s[i + 1] == '3')
          a = '?';
        else if (s[i + 1] == '4')
          a = '!';
        else if (s[i + 1] == '5')
          a = ' ';
      } else {
        ans = "NA";
        break;
      }
      ans += a;
      i += 2;
    }
    cout << ans << endl;
  }
}
