using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AOJ
{
	class Program
	{
		static void Main(string[] args)
		{
			var m = "";
			while ((m = Console.ReadLine()) != null)
			{
				if (m.Length % 2 != 0)
				{
					Console.WriteLine("NA");
				}
				else
				{
					var r = new char[m.Length / 2];
					for (int i = 0; i < m.Length; i += 2)
					{
						r[i / 2] = (char)(((m[i] - '1') * 5 + (m[i + 1] - '1')) + 'a');
					}
					Console.WriteLine(new string(r).Replace('{', '.').Replace('|', '?').Replace('}', '!').Replace('~', ' '));
				}
			}
		}
	}
}