#include<iostream>
#include<string>
using namespace std;

char s[99]="abcdefghijklmnopqrstuvwxyz.?! ############################";
int main(){
	string t;
	while(cin>>t){
		int f = 1;
		string ans;
		for(int i=0;i<t.size();i+=2){
			if(t[i] < '1' || '6' < t[i] || t[i+1] < '1' || '5' < t[i+1]){
				f = 0; break;
			}
			ans.push_back(s[(t[i]-'1')*5+t[i+1]-'1']);
		}
		if(!f) cout << "NA" << endl;
		else cout << ans << endl;
	}
}