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