#include <iostream>
#include <string>
using namespace std;

int main(void)
{
	int n;
	string instr;

	while(cin >> instr, !cin.eof()){
		if(instr.length() % 2){
			cout << "NA"  << endl;
			continue;
		}
		bool cannot = false;
		for(int i = 0; i < instr.length()-1; i+= 2){
			if(instr[i] < '1' || instr[i] > '6' || instr[i+1] < '1' || instr[i+1] > '5'){
				cannot = true;
				break;
			}
		}
		if(cannot){
			cout << "NA" << endl;
			continue;
		}
		for(int i = 0; i < instr.length()-1; i+=2){
			int a = instr[i]-'0', b = instr[i+1]-'0';
			int c = b+(a-1)*5;
			if(c <= 26)
				cout << (char)(c - 1+'a');
			else {
				switch(c%26){
					case 1:
						cout << '.';
						break;
					case 2:
						cout << '?';
						break;
					case 3:
						cout << '!';
						break;
					default:
						cout << ' ';
						break;
				}
			}

		}
		cout << endl;
			
	}

	return 0;
}

	