#include<cstdio>
#include<cstring>
using namespace std;
int main(){
    char a[7][7] = {"","*abcde","*fghij","*klmno","*pqrst","*uvwxy","*z.?! "};
    char s[200];
    while(~scanf("%s",s)){
        bool flg = false;
        if(strlen(s)%2==1)flg = true;
        else{
            for(int i=0;i<strlen(s);i+=2){
                if(s[i]<49||s[i]>54||s[i+1]<49||s[i+1]>53){
                    flg = true;
                    break;
                }
            }
            if(!flg){
                for(int i=0;i<strlen(s);i+=2){
                    printf("%c",a[s[i]-48][s[i+1]-48]);
                }
            }

        }
        if(flg)printf("NA");
        printf("\n");
    }
    return 0;
}