#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5+5;


int t, n, k;
int a[MAXN];

void solve(){
    cin >> t >> n >> k;
    /*if(n > 10000){
        exit(5);
    }*/
    bool flip = (k<0);
    for(int i = 1; i <= n; ++i){
        cin >> a[i];
    }
    sort(a+1,a+n+1);
    if(flip) reverse(a+1,a+n+1);
    //for(int i = 1; i <= n; ++i) cout << a[i] << ' '; cout << '\n';
    for(int bg = 1; bg <= n; ++bg){
        int r = 0;
        for(int i = bg; i != 0;){
            //cout << i << ' ' << r << ' ' << a[i] << '\n';
            r += (a[i] >= r ? 1 : -1);
            if(i >= bg){
                if(i == n) i = bg-1;
                else ++i;
            }
            else --i;
        }
        //cout << r << '\n';
        if(r == k){
            cout << "DA\n";
            if(t){
                for(int i = bg; i != 0;){
                    cout << a[i] << ' ';
                    if(i >= bg){
                        if(i == n) i = bg-1;
                        else ++i;
                    }
                    else --i;
                }
                cout << '\n';
            }
            return;
        }
    }
    cout << "NE\n";
}

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