#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<set>

using namespace std;
const int dx[] = {1,0,-1,0},dy[] = {0,1,0,-1};
#define INF 1e+9
#define EPS 1e-9
#define rep(i,j) for(int i = 0; i < (j); i++)
#define reps(i,j,k) for(int i = j; i < (k); i++)
typedef long long ll;
char num[256];
char decode[][7] = {{0,0,0,0,0},
                   {0,'a','b','c','d','e'},
                   {0,'f','g','h','i','j'},
                   {0,'k','l','m','n','o'},
                   {0,'p','q','r','s','t'},
                   {0,'u','v','w','x','y'},
                   {0,'z','.','?','!',' '}};
string change(){
    if(strlen(num)%2 == 1)return "NA";
    string ans = "";
    for(int i = 0; i < strlen(num); i+=2){
        if('0' < num[i] && num[i] < '7' && '0' < num[i+1] && num[i+1] < '6')ans += decode[num[i]-48][num[i+1]-48];
        else return "NA";        
    }
    return ans;
}
int main(){
    while(~scanf("%s",num)){
        cout << change() << endl;
    }
    return 0;
}