#define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>


#ifdef _DEBUG
#define typeof(X) std::identity<decltype(X)>::type //C++0x (for vs2010)
#else
#define typeof(X) __typeof__(X) // for gcc
#endif

#define sz(a)  int((a).size())
#define FOREACH(it, c) for (typeof((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define FOR(i,count) for (int i = 0; i < (int)(count); i++)

template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
const int MODULO = 100000 ;
const int INF = 100000000; //1e8

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef complex<double> Cd;

using namespace std;

void solve(char* buf){
	char t[] = "abcdefghijklmnopqrstuvwxyz.?! ";
			int n = strlen(buf);
		if(n % 2 != 0){
			puts("NA"); return ;
		}
		n /= 2;
		char nw[256];
		FOR(i,n){
			if('1' <= buf[i*2] && buf[i*2] <= '6' && '1' <= buf[i*2+1] && buf[i*2+1] <= '5'){
			int a = (buf[i*2] - '0') * 5 + buf[i*2+1] - '0' - 6;
			nw[i] = t[a];
			} else {
				puts("NA"); return ;
			}
		}
		nw[n] = '\0';
		puts(nw);
}

int main()
{
	char buf[256];
	while(~scanf("%s",buf)){
		solve(buf);
	}
	return 0;
}