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

int main(void)
{
	char map[6][5] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
	char message[1000], after[1000];
	int i, flag;
	
	while (scanf("%s", message) != EOF){
		getchar();
		flag = 0;
		if (strlen(message) % 2 == 1){
			printf("NA\n");
			flag = 1;
		}
		i = 0;
		memset(after, '\0', sizeof(after));
		while (message[i] != '\0' && !flag){
			if (message[i] > '6' || message[i + 1] > '5'){
				printf("NA\n");
				flag = 1;
				break;
			}
			after[i / 2] =  map[message[i] - '0' - 1][message[i + 1] - '0' - 1];
			i += 2;
		}
		
		if (!flag){
			printf("%s\n", after);
		}
	}
	
	return (0);
}