import std.stdio;
import std.string;

char[300][300] map;
int a, b;

void main(){
	string s, ans;
	for (int i = 0; i < 5; i++) {
		for (int j = 0; j < 5; j++) {
			map[i][j] = cast(char)('a' + j + i*5);
		}
	}
	map[5][0..5] = ['z', '.', '?', '!', ' '];
	while ((s = chomp(readln())), s) {
		if (s.length%2 != 0) {
			writeln("NA");
			continue;
		}

		ans = "";
		for (int i = 0; i < s.length; i+=2) {
			a = s[i] - '1';
			b = s[i+1] - '1';
			if (map[a][b] == 0xFF) {
				ans = "NA";
				break;
			}else {
				ans ~= map[a][b];
			}
		}
		writeln(ans);
	}
}