#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long int lint;



void solve(){
    int t;
    cin >> t;
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }

    bool sviisti = true;
    for(int i = 0; i < n; i++){
        if(a[0] != a[i]){
            sviisti = false;
        }
    }

    if(sviisti){
        int tr = 0;
        for(int i = 0; i < n; i++){
            if(tr <= a[i]){
                tr++;
            }
            else{
                tr--;
            }
        }
        if(tr == k){
            cout << "DA" << endl;
            if(t == 1){
                for(int i = 0; i < n; i++){
                    cout << a[i] << " ";
                }
                cout << endl;
            }
        }
        else{
            cout << "NE" << endl;
        }
        return;
    }
}



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