#include<iostream>
#include<string>
using namespace std;
int main() {
	char a[6][5] = { {'a','b','c','d','e'},{'f','g','h','i','j'},{'k','l','m','n','o'},
	{'p','q','r','s','t'},{'u','v','w','x','y'},{'z','.','?','!',' '} };
	string b;
	while (cin >> b) {
		string c = "";
		if (b.length() % 2 == 1) {
			cout << "NA" << endl;  goto stop;
		}
		int h, w;
		for (int i = 0; i < b.length() ; ) {
			h = (int)b[i++] - '0';
			w = (int)b[i++] - '0';
			if (h > 6 || w > 5) {
				cout << "NA" << endl;
				goto stop;
			}
			h--; w--;
			c += a[h][w];
			h = 0; w = 0;
		}
		cout << c << endl;
	stop:;
	}
}