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

int main()
{
	string line;
	while(cin >> line)
	{
		if(line.size()%2==1)
		{
			cout << "NA" << endl;
			continue;
		}

		string str;
		for(int i=0; i<line.size(); i+=2)
		{
			if('1'<=line[i  ] && line[i  ]<='6'
			&& '1'<=line[i+1] && line[i+1]<='5')
			{
				     if(line[i]=='6' && line[i+1]=='2') str+='.';
				else if(line[i]=='6' && line[i+1]=='3') str+='?';
				else if(line[i]=='6' && line[i+1]=='4') str+='!';
				else if(line[i]=='6' && line[i+1]=='5') str+=' ';
				else str+=(line[i]-'1')*5+(line[i+1]-'1')+'a';
			}
			else
			{
				str = "NA";
				break;
			}
		}
		cout << str << endl;
	}
}