#include <iostream>
using namespace std;

char s[6][6] = {
	"abcde",
	"fghij",
	"klmno",
	"pqrst",
	"uvwxy",
	"z.?! "
};

int main(void){
	string str;

	while(cin>>str){
		if(str.length() % 2 == 1){
			cout<<"NA\n";
			continue;
		}
		string ans = "";
		bool flg = false;
		for(int i=0;i<str.length();i+=2){
			if('1' > str[i] || str[i] >= '7' || '1' > str[i+1] || str[i+1] >= '6'){
				cout<<"NA\n";
				flg = true;
				break;
			}
			int a = str[i] - '1';
			int b = str[i+1] - '1';
			ans += s[a][b];
		}
		if(flg) continue;
		cout<<ans<<endl;
	}

	return 0;
}