#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <ctime>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

string solve(string s)
{
	char table[6][6]={
		"abcde",
		"fghij",
		"klmno",
		"pqrst",
		"uvwxy",
		"z.?! ",
	};
	if(s.size()&1){
		return "NA";
	}
	else{
		string res;
		for(int k=0;k<s.size();k+=2){
			int i=s[k]-'1';
			int j=s[k+1]-'1';
			if(i<0 || 6<=i || j<0 || 5<=j)
				return "NA";
			res+=table[i][j];
		}
		return res;
	}
}

int main()
{
	for(string s;getline(cin,s);)
		cout<<solve(s)<<endl;
	
	return 0;
}