#include <iostream>
using namespace std;


int main(){
	char g[42] = {0,0,0,0,0,0,0,0,97,102,107,112,117,122,0,98,103,108,113,118,46,0,99,104,109,114,119,63,0,100,105,110,115,120,33,0,101,106,111,116,121,32};
	string s,a;
	while(cin >> s,!cin.eof()){
		a = "";
		if(s.size() % 2)a = "NA";
		else{for(int i = 0;i < s.size();i += 2){
				int l = s[i] - '0', r = s[i+1] - '0';
				if(l <= 0 || r <= 0 || l > 6 || r > 5){a = "NA";break;}
			a += g[r * 7 + l];
		}
		}
		cout << a << endl;
	}	
}