import std.algorithm;
import std.array;
import std.ascii;
import std.bigint;
import std.complex;
import std.container;
import std.conv;
import std.datetime;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

auto readInts() {
	return array(map!(to!int)(readln().strip().split()));
}
auto readInt() {
	return readInts()[0];
}
auto readLongs() {
	return array(map!(to!long)(readln().strip().split()));
}
auto readLong() {
	return readLongs()[0];
}

const real eps = 1e-10;
auto solve(){
}

string decode(string s) {
	if(s[0] < '1' || s[0] > '6' || s[1] < '1' || s[1] > '5') {
		return "NA";
	}
	auto c = (s[0] - '1') * 5 + s[1] - '1';
	if(c < 26) {
		return "" ~ cast(char)(c + 'a');
	}
	auto m = ['.', '?', '!', ' '];
	return "" ~ m[c-26];
}


void main(){
	string s;
loop:
	while((s = readln()).length > 0) {
		s = s.strip();
		if(s.length % 2 != 0) {
			writeln("NA");
			continue;
		}
		string t;
		foreach(i; 0..s.length/2) {
			auto u = decode(s[2*i..2*i+2]);
			if(u == "NA") {
				writeln("NA");
				continue loop;
			}
			t ~= u;
		}
		writeln(t);
	}
}