#include <bits/stdc++.h>

using namespace std;
int main()
{
    int t;
    cin >> t;
    int n, k, neg = 0, pos = 0;
    cin >> n >> k;
    vector<int> misl = vector<int>(n);
    for(int i = 0; i < n; i++)
    {
        cin >> misl[i];
        if(misl[i] < 0) neg++;
        if(misl[i] > 0) pos++;
    }
    sort(misl.begin(), misl.end());
    if((n + k) % 2 == 1) cout << "NE";
    else
    {
        int x = (n + k) / 2;
        vector<int> v1 = vector<int>(n);
        vector<int> v2 = vector<int>(n);
        for(int i = 0; i < n; i++)
        {
            if(i < x)
            {
                v1[i] = misl[n - x + i];
            }
            else
            {
                v1[i] = misl[n - 1 - i];
            }
        }

        for(int i = 0; i < n; i++)
        {
            if(i < n - x)
            {
                v2[i] = misl[(n - x) - i - 1];
            }
            else
            {
                v2[i] = misl[i];
            }
        }

        int tek1 = 0;
        int tek2 = 0;
        for(int i = 0; i < n; i++)
        {
            if(tek1 > v1[i]) tek1--;
            else tek1++;
            if(tek2 > v2[i]) tek2--;
            else tek2++;
            //cout << v1[i] << " ";
        }
        if(tek1 == k)
        {
            cout << "DA";
            if(t == 1)
            {
                cout << "\n";
                for(int i = 0; i < n; i++)
                {
                    cout << v1[i] << " ";
                }
            }
        }
        else if (tek2 == k)
        {
            cout << "DA";
            if(t == 1)
            {
                cout << "\n";
                for(int i = 0; i < n; i++)
                {
                    cout << v2[i] << " ";
                }
            }
        }
        else
        {
            cout << "NE";
        }
        //cout <<"\n" << tek;
    }
}