#include <bits/stdc++.h>
#define endl '\n'
#define int long long
#define debug(x) cout << #x << " = " << x << '\n';
using namespace std;

const int MAXN=200009;
int niz[MAXN];



signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t,n,k;cin >> t >> n >> k;
    for(int i=1; i<=n; i++) cin >> niz[i];
    if(n%2!=k%2){cout << "NE"; return 0;}
    sort(niz+1,niz+n);
    int maxi=0;
    for(int i=1; i<=n; i++){
        if(maxi<=niz[i]) maxi++;
        else maxi--;
    }
    reverse(niz+1,niz+n);
    int mini=0;
    for(int i=1; i<=n; i++){
        if(mini<=niz[i]) mini++;
        else mini--;
    }
    if(mini<=k && k<=maxi){
        cout << "DA" << endl;
        if(t){
            for(int i=1; i<=n; i++)
                cout << niz[i] << " ";
        }
    }
    else cout << "NE" << endl;





    return 0;
}
/*
1
7 8 3
1 5 7
1 6
6 2
2 7
7 4
4 3
4 2
3 6
4 5


*/