#include <iostream>
#include <cstring>
using namespace std;

char getGlyph( int col, int row )
{
	if( col < 1 || col > 6 || row < 1 || row > 5 ){
		return '\0';
	}
	char glyph = '\0';
	if( col < 6 ){
		glyph = 'a' + ( col - 1 ) * 5 + ( row - 1 );
	}else{
		const char sign[] = { 'z', '.', '?', '!', ' ' };
		glyph = sign[ row - 1 ];
	}
	return glyph;
}

int main()
{
	char input[ 201 ];
	while( cin >> input ){
		bool failed = false;
		int len = strlen( input );
		int reader = 0;

		char output[ 201 ];
		int writer = 0;

		while( reader < len ){
			int col = input[ reader++ ] - '0';
			if( reader >= len ){
				failed = true;
				break;
			}
			int row = input[ reader++ ] - '0';
			char glyph = getGlyph( col, row );
			if( glyph == '\0' ){
				failed = true;
				break;
			}
			 output[ writer++ ] = glyph;
		}
		if( failed == true ){
			cout << "NA" << endl;
		}else{
			output[ writer ] = '\0';
			cout << output << endl;
		}
	}
	return 0;
}