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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); i++ )
#define UREP( i, m, n ) for ( unsigned int i = (unsigned int)( m ); i < (unsigned int)( n ); i++ )
#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = (c).begin(); it != (c).end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define PB( n ) push_back( ( n ) )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define fst first
#define snd second

int main()
{
	string line;

	while ( cin >> line )
	{
		if ( line.length() % 2 )
		{
			cout << "NA" << endl;
			continue;
		}
		
		string res;

		for ( unsigned int i = 0; i + 1 < line.length(); i += 2 )
		{
			int a, b;
			a = line[i] - '1';
			b = line[i+1] - '1';

			int code = a * 5 + b;

			if ( code < 0 )
			{
				res = "NA";
				break;
			}
			else if ( code < 26 )
			{
				res += 'a' + code;
			}
			else if ( code == 26 )
			{
				res += '.';
			}
			else if ( code == 27 )
			{
				res += '?';
			}
			else if ( code == 28 )
			{
				res += '!';
			}
			else if ( code == 29 )
			{
				res += ' ';
			}
			else
			{
				res = "NA";
				break;
			}
		}

		cout << res << endl;
	}

	return 0;
}