#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	string st;
	while (getline(cin,st)) {
		string ans;
		bool ok = true;
		if (st.size() % 2)ok = false;
		for (int i = 0; i < st.size() / 2; ++i) {
			string ast = st.substr(2 * i, 2);
			int num = (ast[0] - '1') * 5 + (ast[1] - '1');
			if (0<=num&&num <= 25)ans += 'a' + num;
			else if (num == 26)ans += '.';
			else if (num == 27)ans += '?';
			else if (num == 28)ans += '!';
			else if (num == 29)ans += " ";
			else {
				ok = false;
				break;
			}
		}
		if (ok) {
			cout << ans << endl;
		}
		else {
			cout << "NA" << endl;
		}
	}
	return 0;
}