#include <iostream>
using namespace std;

int main(){
	char p[5][6] =
	{{'a','f','k','p','u','z'},
	 {'b','g','l','q','v','.'},
	 {'c','h','m','r','w','?'},
	 {'d','i','n','s','x','!'},
	 {'e','j','o','t','y',' '}};
	string a;	
	while(cin >> a){
		bool flag = false;
		for(size_t i=0;i<a.size();i+=2){
			if(a[i]>'6')
				flag = true;
			if(a[i+1]>'5')
				flag = true;
		}
		if(flag||a.size()%2){
			cout << "NA" << endl;
		}else{
			for(size_t i=0;i<a.size();i+=2){
				cout << p[a[i+1]-'0'-1][a[i]-'0'-1];
			}
			cout << endl;
		}
	}
}