#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

int main(){
	char c[4] = {'.','?','!',' '};
	string S;
	while(cin>>S){
		string ans;
		if(S.size()%2!=0){
			puts("NA"); goto NEXT;
		}
		for(int i=0;i<S.size();i+=2){
			int a = S[i]-'0', b = S[i+1]-'0';
			if(!isdigit(S[i]) || !isdigit(S[i+1]) || a<1 || 6<a || b<1 || 5<b){
				puts("NA"); goto NEXT;
			}
			int n = (a-1)*5+(b-1);
			if(n<26) ans += ('a'+n);
			else if(n<30) ans += c[n-26];
			else{
				puts("NA"); goto NEXT;
			}
		}
		cout<<ans<<endl;
		NEXT:;
	}
	return 0;
}