#include <iostream>

using namespace std;

int main(void)
{
	string str;
	
	char data[10][10];
	
	char cnt = 'a';
	for (int i = 1; i <= 6; i++){
		for (int j = 1; j <= 5; j++){
			data[j][i] = cnt;
			cnt++;
		}
	}
	
	data[2][6] = '.';
	data[3][6] = '?';
	data[4][6] = '!';
	data[5][6] = ' ';
	
	while (cin >> str){
		if (str.length() % 2 == 1){
			cout << "NA" << endl;
			continue;
		}
		string ret = "";
		bool ef = true;
		for (int i = 0; i < str.length(); i++){
			if ('1' <= str[i] && str[i] <= '6'){
				i++;
				if ('1' <= str[i] && str[i] <= '5'){
					ret += data[str[i] - '0'][str[i - 1] - '0'];
					// printf("data[%d][%d] = %c\n", str[i] - '0', str[i - 1] - '0', data[str[i] - '0'][str[i - 1] - '0']);
				}
				else {
					ef = false;
					break;
				}
			}
			else {
				ef = false;
				break;
			}
		}
		if (ef) cout << ret << endl;
		else  cout << "NA" << endl;
	}
	
	return 0;
}