#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <queue>

using namespace std;

char func(int code){
	switch(code){
	case 11:return 'a';
	case 12:return 'b';
	case 13:return 'c';
	case 14:return 'd';
	case 15:return 'e';
	case 21:return 'f';
	case 22:return 'g';
	case 23:return 'h';
	case 24:return 'i';
	case 25:return 'j';
	case 31:return 'k';
	case 32:return 'l';
	case 33:return 'm';
	case 34:return 'n';
	case 35:return 'o';
	case 41:return 'p';
	case 42:return 'q';
	case 43:return 'r';
	case 44:return 's';
	case 45:return 't';
	case 51:return 'u';
	case 52:return 'v';
	case 53:return 'w';
	case 54:return 'x';
	case 55:return 'y';
	case 61:return 'z';
	case 62:return '.';
	case 63:return '?';
	case 64:return '!';
	case 65:return ' ';
	default:return '*';
	}
}


int main(){

	char buf[201],result[101],tmp;
	int p;
	bool NA_FLG;

	while(scanf("%s",buf)!=EOF){
		p = 0;
		NA_FLG = false;

		for(int i=0; buf[i] != '\0';){
			if(buf[i+1] != '\0'){
				tmp = func(10*(buf[i]-'0')+(buf[i+1])-'0');
				if(tmp == '*'){
					NA_FLG = true;
					break;
				}
				result[p++] = tmp;
				result[p] = '\0';
				i += 2;
			}else{
				NA_FLG = true;
				i++;
			}
		}

		if(NA_FLG)printf("NA\n");
		else{
			printf("%s\n",result);
		}
	}

    return 0;
}