#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define sc second
#define endl "\n"
#define pii pair<int,int>

using namespace std;

const int MAXN = 1e5+5;
const int mod7 = 1e9+7;
const long long inf = 1e18;

signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t;cin >> t;
    int n,k; cin >> n >> k;
    vector<int> niz(n);
    vector<int> redosled;
    for(int i=0; i<n; i++)cin >> niz[i];
    sort(all(niz));
    int cntadd = (k+n)/2;
    int cntsub = (n-k)/2;
    int score = 0;
    if(cntadd + cntsub != n)cout << "NE" << endl;
    else
    {
        int l = cntsub-1;
        int r = l+1;
        while(l >= 0 && r<n)
        {
            if(niz[l] < score)
            {
                redosled.pb(niz[l--]);
                score--;
            }
            else if(niz[r] >= score)
            {
                redosled.pb(niz[r++]);
                score++;
            }
        }
        if(l == -1)
        {
            for(int i=r; i<n; i++)
            {
                if(niz[i] < score)
                {
                    redosled.pb(niz[i]);
                    score--;
                }
                else if(niz[i] >= score)
                {
                    redosled.pb(niz[i]);
                    score++;
                }
            }
        }
        else if(r == n)
        {
            for(int i=l; i>=0; i--)
            {
                if(niz[i] < score)
                {
                    redosled.pb(niz[i]);
                    score--;
                }
                else if(niz[i] >= score)
                {
                    redosled.pb(niz[i]);
                    score++;
                }
            }
        }
        if(score == k)cout << "DA" << endl;
        else cout << "NE" << endl;
    }
    if(t== 1 && score == k)
    {
        for(auto x: redosled)cout << x << " ";cout << endl;
    }



}