#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>
#include <set>
#include <iostream>
#include <map>
#include <functional>
#include <cstdlib>
#include <numeric>
#include <queue>
#include <complex>
#include <sstream>
#include <stack>

using namespace std;

#define reep(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reep(i,0,n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef complex<double> Point;

const char* strs = "abcdefghijklmnopqrstuvwxyz.?! ";

int main()
{
	char str[256];
	while(scanf("%s", str) != EOF){
		int n = strlen(str);
		char output[256] = {0};
		bool ok = true;
		for(int i=0; i<n; i+=2){
			if(i+1 == n){
				ok = false;
				break;
			}
			int a = str[i] - '1';
			int b = str[i+1] - '1';
			if(a<0 || 6<=a || b<0 || 5<=b){
				ok = false;
				break;
			}
			output[i/2] = strs[a*5+b];
		}
		
		puts(ok ? output : "NA");
	}
	
	return 0;
}