#include<bits/stdc++.h>
using namespace std;
using ll=long long;

const ll N=2e5+55;
ll a[N],n,k;

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);

    ll T;cin>>T;
    cin>>n>>k;
    for(int i=1;i<=n;++i)
        cin>>a[i];

    if((n&1)!=(k&1)){
        cout<<"NE";return 0;
    }

    if((n-k)/2<0){
        cout<<"NE";return 0;
    }

    vector<ll>v,ans;
    for(int i=1;i<=n;++i)
        v.push_back(a[i]);
    sort(v.begin(),v.end());

    ll vc=(n+k)/2,cur=0;
    for(int l=1;l<=n;++l){
        if(!vc){
            auto it=lower_bound(v.begin(),v.end(),cur);
            if(it==v.begin()){
                cout<<"NE";return 0;
            }
            --it;
            --cur;
            ans.push_back(*it);
            v.erase(it);
        }else{
            auto it=lower_bound(v.begin(),v.end(),cur);
            if(it==v.end()){
                if(it==v.begin()){
                    cout<<"NE";return 0;
                }
                --it;
                --cur;
                ans.push_back(*it);
                v.erase(it);
                continue;
            }
            --vc;
            ++cur;
            ans.push_back(*it);
            v.erase(it);
        }
    }

    cout<<"DA";
    if(T){
        cout<<'\n';
        for(ll xx:ans)cout<<xx<<' ';
    }
}