#define _USE_MATH_DEFINES
#include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <cmath>
#include <math.h>
#include <numeric>
#include <list>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <set>
#include <memory.h>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <map>
#include <cassert>
#include <time.h>

using namespace std;

typedef complex<double> xy_t;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int , P> PP;
typedef pair<int, string> Ps;
typedef vector<int> vec;
typedef vector<vec> mat;
const int INF= 1 << 30;
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;

#define rep(i, n) for(int i = 0; i < n; i++)
string data = "afkpuzbglqv.chmrw?dinsx!ejoty ";

int main(){
	string s;
	while(cin >> s){
		if(s.size() % 2 != 0){
			cout << "NA" << endl;
			continue;
		}
		bool ok = true;
		string res(s.size()/2,' ');
		rep(i, (int)s.size()/2){
			int a = s[i*2] - '1';
			int b = s[i*2+1] - '1';
			if(a < 0 || 5 < a || b < 0 || 4 < b) {
				ok = false;
				break;
			}
			res[i] = data[b*6+a];
		}
		if(ok) cout << res << endl;
		else cout << "NA" << endl;
	}
	return 0;
}