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

int main(void){
	int i,len,size;
	char s[1024],rst[512],n[6][8]={"abcde","fghij","klmno","pqrst","uvwxy","z.?! "};
	bool flg;

	while(cin>>s){
		size = 0;
		flg = true;
		if((len = strlen(s)) % 2 != 0) flg = false;

		for(i=0;flg && i<len;i+=2){
			if('0'<s[i] && s[i]<'7' && '0'<s[i+1] && s[i+1]<'6')
				rst[size++] = n[s[i]-'1'][s[i+1]-'1'];
			else
				flg = false;
		}
		rst[size] = 0;

		if(flg) cout<<rst<<endl;
		else cout<<"NA\n";
	}

	return 0;
}