#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string str;
  while (cin >> str) {
    string ans;
    bool ch = true;
    if (str.size() % 2 == 1)
      cout << "NA" << endl;
    else {
      for (int i = 0; i < str.size(); i += 2) {
        if (str[i] >= '7' || str[i + 1] >= '7') {
          ch = false;
          break;
        } else {
          if (str[i] == '6' && str[i + 1] == '2')
            ans += ".";
          else if (str[i] == '6' && str[i + 1] == '3')
            ans += "?";
          else if (str[i] == '6' && str[i + 1] == '4')
            ans += "!";
          else if (str[i] == '6' && str[i + 1] == '5')
            ans += " ";
          else
            ans += (str[i] - '1') * 5 + (str[i + 1] - '1') + 'a';
        }
      }
      if (ch == true)
        cout << ans << endl;
      else
        cout << "NA" << endl;
    }
  }
  return 0;
}
