#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  int hoge[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','.','?','!',' '}};
  string s;
  while(cin>>s) {
    string ans;
    int i;
    for(i=0; i<s.length(); i+=2) {
      int a = s[i]-'1';
      int b = s[i+1]-'1';
      if (a<0||6<=a||b<0||5<=b) {
        ans = "NA";
        break;
      }
      ans += hoge[a][b];
    }
    cout << ans << endl;
  }
}