#include<bits/stdc++.h>
using namespace std;
int t, n, k, a[100050], uvazenost;
bool flag1, flag2, flag3, flag4;
int brneg, brpoz;
void PRVI_SET()
{
    uvazenost = 0;
    for(int i=1; i<=n; i++)
    {
        if(uvazenost <= a[i])
            uvazenost++;
        else
            uvazenost--;
        //cout << a[i] << " ";
    }

    if(uvazenost == k)
    {
        cout << "DA\n";
        if(t == 1)
        {
            for(int i=1; i<=n; i++)
                cout << a[i] << " ";
            cout << "\n";
        }

        else
        {

        }
        return;
    }
    cout << "NE\n" << uvazenost;
    return;
}


void DRUGI_SET()
{
    do{
        uvazenost = 0;
        for(int i=1; i<=n; i++)
        {
            if(uvazenost <= a[i])
                uvazenost++;
            else
                uvazenost--;

          //  cout << a[i] << " ";
        }
        //cout << ": " << uvazenost << "\n";

        if(uvazenost == k)
        {
            cout << "DA\n";

            if(t == 1)
            {
                for(int i=1; i<=n; i++)
                    cout << a[i] << " ";
                cout << "\n";
            }
            return;
        }

    }while(next_permutation(a+1, a+n+1));
    cout << "NE\n";
    return;
}

int main()
{
    cin >> t;
    cin >> n >> k;
    for(int i=1; i<=n; i++)
        cin >> a[i];
    sort(a+1, a+n+1);

    flag1 = 1;
    flag3 = 1;
    for(int i=2; i<=n; i++)
    {
        if(a[i] != a[1])
        {
            flag1 = 0;
            //break;
        }

        if(a[i] != -1 or a[i] != 1)
        {
            flag3 = 0;
        }
    }

    /*if(n<=8)
        flag2 = 1;


    if(flag1)
    {
        PRVI_SET();
        return 0;
    }

    if(flag2)
    {
        DRUGI_SET();
        return 0;
    }*/


    if(flag3)
    {
        while(true)
        {
            brneg++;
        }
        sort(a+1, a+n+1);

        for(int i=1; i<=n; i++)
        {
            if(a[i] < 0)
                brneg++;
            else
                brpoz++;
        }


        if(brpoz == 0 or brneg == 0) /// NIJE PROBLEM
        {
            PRVI_SET();
            return 0;
        }

        if(brpoz == 1)
        {
            if(k == 0)
            {
                cout << "DA\n";
                if(t)
                {
                    for(int i=1; i<=n; i++)
                        cout << a[i] << " ";
                    cout << "\n";
                }
                //return 0;
            }

            else
                cout << "NE\n";


            return 0;
        }

        if(n%2 == 0)
        {
            if(k == 0)
            {
                cout << "DA\n";

                if(t)
                {
                    for(int i=n; i>=1; i--)
                        cout << a[i] << " ";
                    cout << "\n";
                }
                return 0;
            }

            if(k == 2)
            {
                cout << "DA\n";
                if(t)
                {
                    for(int i=1; i<=n; i++)
                        cout << a[i] << " ";
                    cout << "\n";
                }
                return 0;
            }


            else
            {
                cout << "NE\n";
                return 0;
            }
        }

        if(n%2 != 0)
        {
            if(k == -1)
            {
                cout << "DA\n";

                if(t)
                {
                    for(int i=n; i>=1; i--)
                        cout << a[i] << " ";
                    cout << "\n";
                }
                return 0;
            }

            if(k == 1)
            {
                cout << "DA\n";

                if(t)
                {
                    for(int i=1; i<=n; i++)
                        cout << a[i] << " ";
                    cout << "\n";
                }
                return 0;
            }


            else
            {
                cout << "NE\n";
                return 0;
            }
        }
    }


    else
        cout << "NE\n";
    return 0;
}
/*
PRIMER 1:
0
10 3
-3 -3 -3 -3 -3 -3 -3 -3 -3 -3

PRIMER 3:
0
4 3
-1 -1 1 1

PRIMER 4
0
5 5
1 2 3 4 5

*/