#include <cstdio>
#include <string.h>
using namespace std;

int main()
{
	char change[6][6] = {
		"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "
	};
	
	char str[256];
	
	while (scanf("%s", str) != EOF){
		char str2[256];
		strcpy(str2, "");
		
		int i = 0;
		while (str[i] != '\0'){
			if (
			(str[i] < '1' || str[i] > '6') || 
			(str[i + 1] < '1' || str[i + 1] > '5')
			){
				strcpy(str2, "NA");
				break;
			}
						
			strncat(str2, &change[str[i] - '0' - 1][str[i + 1] - '0' - 1], 1);
			
			i += 2;
		}
		
		printf("%s\n", str2);
	}
	
	return 0;
}