internal class Program
{
    static void Main(string[] args)
    {
        int uvazenost = 0;
        int t = Convert.ToInt32(Console.ReadLine());
        string[] unos = Console.ReadLine().Split();
        int n = Convert.ToInt32(unos[0]);
        int k = Convert.ToInt32(unos[1]);
        int[] brojevi = new int[n];
        string[] unos2 = Console.ReadLine().Split();
        for (int i = 0; i < n; i++)
            brojevi[i] = Convert.ToInt32(unos2[i]);
        int a = Convert.ToInt32(brojevi[1]);
        for(int i = 0; i < n; i++)
        {
            if (uvazenost <= a)
                uvazenost += 1;
            else if (uvazenost > a)
                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");
        }
    }
}