#include <bits/stdc++.h>
using namespace std;
int main() {
  string nums, text, ch;
  ch = "abcdefghijklmnopqrstuvwxyz.?! ";
  while (cin >> nums) {
    text = "";
    if (nums.size() % 2) {
      cout << "NA" << endl;
    } else {
      for (int i = 0; i < nums.size() / 2; i++) {
        if ('0' < nums[i * 2] && nums[i * 2] < '7' && '0' < nums[i * 2 + 1] &&
            nums[i * 2 + 1] < '7')
          text = text + ch[5 * (nums[i * 2] - 49) + (nums[i * 2 + 1] - 49)];
        else {
          text = "NA";
          break;
        }
      }
      cout << text << endl;
    }
  }
  return 0;
}
