#include<bits/stdc++.h>

using namespace std;

#define int long long

void solve(){
    int t;
    cin>>t;
    int n, k;
    cin>>n>>k;
    vector<int> v(n);
    for(int i = 0;i<n;i++){
        cin>>v[i];
    }
    if((n%2)!=(k%2)){
        cout<<"NE"<<endl;
        return;
    }
    int x = 0;
    sort(v.begin(), v.end());
    for(int i = 0;i<n;i++){
        if(v[i]>=x) x++;
        else x--;
    }
    if(x<k){
        cout<<"NE"<<endl;
        return;
    }
    cout<<"DA"<<endl;
    for(int i = 0;i<n;i++){
        cout<<v[i]<<" ";
    }
    cout<<endl;
    return;
}

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int t = 1;
    //cin>>t;
    while(t--){
        solve();
    }
    return 0;
}