#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

char c[]={'z','.','?','!',' '};
string s;

int main(){
	while(getline(cin,s)){
		int l=s.size();
		if(l%2){cout<<"NA"<<endl;continue;}
		int cur=0,f=0;
		string ans="";
		while(cur<l){
			int a=s[cur++]-'0',b=s[cur++]-'0';
			if(a<1||a>6||b<1||b>5){cout<<"NA"<<endl;f=1;break;}
			if(a<6)ans+=(char)('a'+(a-1)*5+b-1);
			if(a==6)ans+=c[b-1];
		}
		if(!f)cout<<ans<<endl;
	}
}