#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	string s;
	while(cin >> s)
	{
		string ans;
		int sz=s.size();
		if(sz%2==1)
		{
			cout << "NA" << endl;
			continue;
		}
		for(int i=0;i<sz/2;i++)
		{
			int f=s[2*i]-'0',se=s[2*i+1]-'0';
			if(f<0||f>6||se<0||se>5)
			{
				cout << "NA" << endl;
				goto end;
			}
			if(f==6&&se>=2)
			{
				switch(se)
				{
					case 2:ans+='.';break;
					case 3:ans+='?';break;
					case 4:ans+='!';break;
					case 5:ans+=' ';break;
				}
			}
			else ans+='a'+(f-1)*5+se-1;
		}
		cout << ans << endl;
		end:;
	}
	return 0;
}