#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef vector<lint> vli;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main(){
	string s;
	while(cin>>s){
		if(s.size()%2){
			o("NA"); continue;
		}
		bool f=1;
		string ans="",t="z.?! ";
		rep(i,0,s.size()/2){
			if(1<=s[2*i]-'0' && s[2*i]-'0'<=6 && 1<=s[2*i+1]-'0' && s[2*i+1]-'0'<=5){
				if(s[2*i]!='6'){
					ans+='a'+5*(s[2*i]-'1')+s[2*i+1]-'1';
				}else if(s[i*2]=='6'){
					ans+=t[s[2*i+1]-'1'];
				}
			}else f=0;
		}
		if(f) o(ans);
		else o("NA");
	}
}