#include<bits/stdc++.h>
using namespace std;
typedef long long li;
#define fi first
#define sc second
#define all(x) x.begin(), x.end()
#define pb push_back
#define eb emplace_back
#define pii pair<int,int>
const int maxn = 2e5+5;
int a[maxn];
int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    int t; cin >> t;
    int n, k; cin >> n >> k;
    set<int> v;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
        v.insert(a[i]);
    }
    if(v.size() == 1){
        int x = 0;
        for(int i = 1; i <= n; i++){
            if(x <= a[i]) x++;
            else x--;
        }

        if(x == k){
            cout << "DA" << '\n';
            for(int i = 1; i <= n; i++) cout << a[i] << ' ';
            cout << '\n';
        }
        else cout << "NE" << '\n';
    }
    return 0;
}