#include<iostream>
#include<string>
using namespace std;
string S, T; int a;
char c[101] = "00000000000abcde00000fghij00000klmno00000pqrst00000uvwxy00000z.?! 0000000000000000000000000000000000";
int main() {
	while (cin >> S) {
		T = "";
		if (S.size() % 2 == 1) {
			cout << "NA" << endl; goto E;
		}
		for (int i = 0; i < S.size() / 2; i++) {
			a = stoi(S.substr(i * 2, 2));
			if (c[a] == '0') { cout << "NA" << endl; goto E; }
			else { T += c[a]; }
		}
		cout << T << endl;
	E:;
	}
}