#include<iostream>
#include<vector>
#include<string>
using namespace std;

int main() {
	string a;
	while (1) {
	k:;
		cin >> a;
		if (cin.fail())break;
		if (a.length() % 2) { cout << "NA" << endl; continue;}
		for (int b = 0; b < a.length(); b += 2) {
			if (a[b]<'1' || a[b]>'6' || a[b + 1]<'1' || a[b + 1]>'5') { cout << "NA" << endl; goto k; }
			int s = (a[b] - 49) * 5 + (a[b + 1] - 49);
			if ((s + 97) < '{')	cout << (char)(s + 97);
			else {
				switch (s + 97) {
				case 123:cout << '.'; break;
				case 124:cout << '?'; break;
				case 125:cout << '!'; break;
				case 126:cout << ' '; break;
				}
			}
		}
		cout << endl;
	}
}