internal class Program
{
    static void Main(string[] args)
    {
        int t = Convert.ToInt32(Console.ReadLine());
        string[] unos1 = Console.ReadLine().Split();
        int n = Convert.ToInt32(unos1[0]);
        int k = Convert.ToInt32(unos1[0]);
        int[] brojevi = new int[n];
        int uvazenost = 0;
        string[] unos2 = Console.ReadLine().Split();
        for(int i = 0; i < n; i++)
            brojevi[i] = Convert.ToInt32(unos2[i]);
        for(int i = 1; i <= n; i++)
        {
            if (uvazenost <= brojevi[i - 1])
                uvazenost++;
            else
                uvazenost--;
        }
        if(t == 0)
        {
            if(uvazenost != k)
                Console.WriteLine("DA");
            else
                Console.WriteLine("NE");
        }
        if(t == 1)
        {
            if(uvazenost == k)
                Console.WriteLine("NE");
            else
            {
                Console.WriteLine("DA");
                foreach(int i in brojevi)
                    Console.Write(i + " ");
            }
        }
    }
}