#include <iostream>
#include <string>

using namespace std;

int main(int argc, char const* argv[])
{
	string data;
	string output;

START:
	while( cin >> data ){
		output.clear();
		if( data.size() % 2 ){
			cout << "NA" << endl;
			continue;
		}

		for( int i = 0;i < data .size() / 2;i++ ){
			int j = i * 2;
			data[j] -= '0';
			data[j + 1] -= '0';
			if( data[j] < 1 || data[j + 1] < 1 || data[j] > 6 || data[j + 1] > 5 ){
				cout << "NA" << endl;
				goto START;
			}
			if( data[j] == 6 && data[j + 1] > 1 ){
				if( data[j + 1] == 2 ) output.append(1,'.');
				else if( data[j + 1] == 3 ) output.append(1,'?');
				else if( data[j + 1] == 4 ) output.append(1,'!');
				else if( data[j + 1] == 5 ) output.append(1,' ');
			} else {
				char a = ( data[j] - 1 ) * 5 + data[j + 1] - 1 + 'a';
				output.append(1,a);
			}
		}
		cout << output <<  endl;
	}


	
	return 0;
}