#include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)
char c[201], d[101];
int main() {
	while (~scanf("%s", c)) {
		if (strlen(c) % 2 == 1) {
			printf("NA\n");
		}
		else {
			bool flag = false;
			for (int i = 0; i < strlen(c); i += 2) {
				int a = c[i] - 48, b = c[i + 1] - 48;
				if (a == 0 || a > 6 || b == 0 || b > 5) {
					printf("NA"); flag = true; break;
				}
				else {
					int e = (a - 1) * 5 + (b - 1);
					switch (e) {
					case 26: d[i / 2] = '.'; break;
					case 27: d[i / 2] = '?'; break;
					case 28: d[i / 2] = '!'; break;
					case 29: d[i / 2] = ' '; break;
					default: d[i / 2] = (char)(e + 97); break;
					}
				}
			}
			if (!flag) {
				for (int i = 0; i < strlen(c) / 2; i++) {
					printf("%c", d[i]);
				}
			}
			printf("\n");
		}
	}
	return 0;
}