#include <iostream>
#include <stdio.h>
#include <string.h>

using namespace std;

int main() {
	char h[6][6]={"abcde","fghij","klmno","pqrst","uvwxy","z.?! "},c[202];
	int i,n;
	while(cin >> c) {
    n=strlen(c);
	for (i=0;i<n-1;i+=2) if (c[i]<'1' || c[i]>'6' || c[i+1]<'1' || c[i+1]>'5') break;
	if ((n % 2!=0) || (i!=n)) { cout << "NA" << endl; continue;} 
	for (i=0;i<n-1;i+=2) cout << h[c[i]-'0'-1][c[i+1]-'0'-1];
	cout << endl;
	}
 return 0;
}