#include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>
#define pb(in,tmp) in.push_back(tmp)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
char in[200]={'\0'};
char out[5][6]={
  {'a','f','k','p','u','z'},
  {'b','g','l','q','v','.'},
  {'c','h','m','r','w','?'},
  {'d','i','n','s','x','!'},
  {'e','j','o','t','y',' '},
};
int main(){
  while(cin>>in){
    int co=0;
    rep(i,200)if(in[i]!='\0')co++;
	if(co%2){rep(i,co)in[i]='\0';cout<<"NA"<<endl;continue;}
	bool a=true;
	rep(i,co){
	  if(!i%2&&(in[i]<='0'||in[i]>'6'))a=false;
	  if(i%2&&(in[i]<='0'||in[i]>'5'))a=false;
	}
	if(!a){rep(i,co)in[i]='\0';cout<<"NA"<<endl;continue;}
	rep(i,co){
	  int a,b;
	  a=in[i]-'1';
	  i++;
	  b=in[i]-'1';
	  cout<<out[b][a];
	}
    cout<<endl;
	rep(i,co)in[i]='\0';
  }
}