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

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