#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>

#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define all(v) (v).begin(), (v).end()
#define rev(s) (s).rbegin(), (s).rend()
#define MP make_pair
#define X first
#define Y second

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;

int main(){
	vector<string> t(6);
	string s = "afkpu";
	rep(i, 5) rep(j, 5){
		t[i].push_back(s[i]+j);
	}
	t[5] = "z.?! ";

	string in;
	while(cin >> in){
		string buf;
		bool ok = true;
		if(in.size()%2) ok = false;
		rep(i, in.size()){
			if(in[i] < '1' || in[i] > '6'-(i%2)) ok = false;
		}
		if(ok) for(int i = 0; i < in.size(); i+= 2){
			int a = in[i]-'1';
			int b = in[i+1]-'1';
			buf += t[a][b];
		}
		if(buf.size()) cout << buf << endl;
		else cout << "NA" << endl;
	}

	return 0;
}