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