#include <iostream>

const char TABLE[6][5] = {
	{'a', 'b', 'c', 'd', 'e'}, 
	{'f', 'g', 'h', 'i', 'j'},
	{'k', 'l', 'm', 'n', 'o'},
	{'p', 'q', 'r', 's', 't'},
	{'u', 'v', 'w', 'x', 'y'},
	{'z', '.', '?', '!', ' '}
};


int main()
{
	std::string input;
	while (getline(std::cin, input)) {
		std::string ans;
		bool na = (input.length() & 1) == 1;
		for (int i=0; !na && i<input.length(); i+=2) {
			int c = input[i] - '0';
			int d = input[i+1] - '0';
			if (c < 1 || 6 < c || d < 1 || 5 < d) {
				na = true;
			}
			else ans += TABLE[c-1][d-1];
		}
		if (na) std::cout << "NA" << std::endl;
		else std::cout << ans << std::endl;
	}
	return 0;
}


