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

int main()
{
	string table[6] = { "abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! " };
	string s;
	int a,b;
	while (cin>>s)
	{
		int flg = 1;
		string ans;
		if (s.size()%2)		//??????????????????????\???°?????´???
		{
			cout << "NA" << endl;
		}
		else
		{
			for (int i = 0; i < s.size(); i += 2)
			{
				if ((s[i] < '1') || (s[i] > '6') || (s[i + 1] < '1') || (s[i + 1] > '5'))
				{
					flg = 0;		//??????????????????????????§???????????´???
				}
			}

			if (flg)
			{
				for (int i = 0; i < s.size(); i+=2)		//????????????????????¨????????????????????´???
				{
					a = s[i] - '0'-1;
					b = s[i + 1] - '0'-1;
					ans += table[a][b];
				}
				cout << ans <<endl;
			}
			else
			{
				cout << "NA" <<endl;
			}
		}
	}

	return 0;
}