#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);

signed main() {
	string s;
	vector<vector<char>>v(7, vector<char>(7));
	char a = 'a';
	rep(j, 1, 7) {
		rep(i, 1, 6) {
			v[i][j] = a++;
		}
	}

	v[2][6] = '.'; v[3][6] = '?'; v[4][6] = '!'; v[5][6] = ' ';
	rep(i, 0, 6)dumpc(v[i]);
	while (cin >> s) {
		if (s.size() & 1) {
			cout << "NA" << endl;
			continue;
		}
		bool f(false);
		//rep(i, 0, s.size()) {
		//	s[i] -= '0';
		//	if (i & 1) {
		//		if (s[i] >= 7)f = true;
		//	}
		//	else {
		//		if (s[i] >= 6)f = true;
		//	}
		//}
		//
		//if (f) {
		//	cout << "NA" << endl;
		//	continue;
		//}
		string ans;
		for (int i = 0; i + 1 < s.size(); i += 2) {
			ans += v[s[i + 1] - '0'][s[i] - '0'];
		}
		cout << ans << endl;
	}
	return 0;
}