
#include <algorithm>
#include <iostream>
#include <vector>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

//テ」ツδ榲」ツつッテ」ツδュテ・ツョツ堙ァツセツゥ
#define ALL(v) (v).begin(),(v).end()
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
#define REP(i,a,b) for(int i=(int)(a); i<(int)(b); ++i)
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define SORT(x) sort(begin(x),end(x))
#define SELECT_SORT(x, n) sort(begin(x),begin(x)+n)
#define SWAP(type, a, b) do {type tmp = a; a = b; b = tmp;} while (0)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))

//テ・ツョツ堙ヲツ閉ー
#define INF 2000000000000
#define MAX 10

//DEBUGテァツ板ィ
#define BAR() cout << "----------------------------" << endl;
#define DUMP(v) (cerr << #v << ": " << v << endl)
#define PRINT(list) cout << "{ "; for(auto nth : list){ cout << nth << " "; } cout << "}" << endl;

bool check(string input){
	int len = input.length();
	if(len % 2 == 0)
	{
		
		for(int i=0; i<len; i+=2)
		{
			int x = input[i] - '0';
			int y = input[i+1] - '0';
			if(x==0 || x > 6){return false;}
			if(y==0 || y > 5){return false;}
		}
		return true;
	}else{
		return false;
	}
}

int main()
{
	string table[10][10] = {{},
		                 {" ", "a", "b", "c", "d", "e"},
						 {" ", "f", "g", "h", "i", "j"},
						 {" ", "k", "l", "m", "n", "o"},
						 {" ", "p", "q", "r", "s", "t"},
						 {" ", "u", "v", "w", "x", "y"},
						 {" ", "z", ".", "?", "!", " "}};
	
	string input="0";
	while(cin >> input)
	{
		int len = input.length();
		if(check(input))
		{
			
			for(int i=0; i<len; i+=2)
			{
				int x = input[i] - '0';
				int y = input[i+1] - '0';
				cout << table[x][y];
			}
			cout << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}
}