#include <bits/stdc++.h>

using namespace std;

static inline int in(){ int x; scanf("%d", &x); return x; }

int main()
{
  string s;
  while (cin >> s){
    bool ok = true;
    for (int i = 0; i < s.size(); i++){
      if (i % 2 == 0){
        if (s[i] < '1' || '6' < s[i]){
          ok = false;
          break;
        }
      }
      else {
        if (s[i] < '1' || '5' < s[i]){
          ok = false;
          break;
        }
      }
    }
    if (s.size() % 2 == 1 || !ok){
      puts("NA");
      continue;
    }
    char *table[6] = {
      "abcde",
      "fghij",
      "klmno",
      "pqrst",
      "uvwxy",
      "z.?! "
    };
    for (int i = 0; i < s.size(); i += 2){
      printf("%c", table[s[i] - '1'][s[i + 1] - '1']);
    }
    puts("");
  }

  return 0;
}