using System;

public class Hello
{
    public static void Main()
    {
        var m = "abcdefghijklmnopqrstuvwxyz.?! ";
        var p = 0;
        var ct = new char[6,5];
        for (int i = 0; i < 6; i++)
            for (int j = 0; j < 5; j++)
                ct[i, j] = m[p++];
        string line;
        for (; (line = Console.ReadLine()) != null;)
        {
            var s = line.Trim();
            change(ct, s);
        }
    }
    public static void change (char[,] ct , string s)
    {
        var ret = "";
        var sL = s.Length;
        if (sL % 2 == 1) { Console.WriteLine("NA");  return; }
        for (int i = 0; i < (sL + 1) / 2; i++)
        {
            var x = int.Parse(s[2 * i].ToString())-1;
            if (x >= 6) { Console.WriteLine("NA"); return; }
            var y = int.Parse(s[2 * i + 1].ToString())-1;
            if (y >= 5) { Console.WriteLine("NA"); return; }
            ret += ct[x, y];
        }
        Console.WriteLine(ret);
    }
}