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


char decode(int a,int b){
	int x=a*5+b;
	if(x<26)return x+'a';
	return ".?! "[x-26];
}

int main(){
	string s;
	while(cin>>s){
		if(s.size()%2){
			cout<<"NA\n";
			continue;
		}
		for(int i=0;i<s.size();i+=2){
			cout<<decode(s[i]-'1',s[i+1]-'1');
		}
		cout<<endl;
	}
	return 0;
}