#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define pb push_back
#define mp make_pair
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

string mes, ans;
char hyou[6][7] = {
	{' ', ' ', ' ', ' ', ' ', ' ', ' '},
	{' ', 'a', 'f', 'k', 'p', 'u', 'z'},
	{' ', 'b', 'g', 'l', 'q', 'v', '.'},
	{' ', 'c', 'h', 'm', 'r', 'w', '?'},
	{' ', 'd', 'i', 'n', 's', 'x', '!'},
	{' ', 'e', 'j', 'o', 't', 'y', ' '}
};

int main()
{
	while (cin >> mes)
	{
		ans = "";

		if (mes.length() % 2 != 0)
		{
			cout << "NA" << endl;
			continue;
		}

		for (int i=0; i<mes.length(); i++)
		{
			int first = mes[i] - '0';
			int second = mes[i+1] - '0';
			i++;

			if (!(1 <= first && first <= 6) || !(1 <= second && second <= 5))
			{
				ans = "NA";
				break;
			}

			ans += hyou[second][first];
		}

		cout << ans << endl;
	}
	
	return 0;
}