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

int main() {
	
	char table[31] = "abcdefghijklmnopqrstuvwxyz.?! ",s[201];
	int i,l;
	
	while(cin>>s){
		l=strlen(s);
		if(l%2)
			cout<<"NA";
		else
			for(i=0;i<l;i+=2)
				if(s[i]<=54 && s[i+1]<=53)
					cout << table[(s[i]-49)*5+s[i+1]-49];
		cout<<endl;
	}
	return 0;
}