#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;

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

    int t,n,k;
    cin >> t>>n>>k;

    vi a(n);
    for(int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());

    bool possible = false;
    int uvazenost = 0;
    for (int i =0;i < n; i++) {
        if (uvazenost > a[i]) {
            uvazenost--;
        } else {
            uvazenost++;
        }
    }
    int maxx = uvazenost;

    uvazenost = 0;
    reverse(a.begin(), a.end());
    for (int i =0;i < n; i++) {
        if (uvazenost > a[i]) {
            uvazenost--;
        } else {
            uvazenost++;
        }
    }
    int minn = uvazenost;

    possible = (k >= minn && k<=maxx) && ((k&1)==(maxx&1) || (k&1)==(minn&1));

    if(possible) {
        if ((maxx-k) < (k-minn)) {
                reverse(a.begin(), a.end());
                for (int i = 0; i < maxx-k; i++) {
                    swap(a[i], a[n-i-1]);
                }
        } else {
            for (int i = 0; i < k-minn; i++) {
                    swap(a[i], a[n-i-1]);
                }
        }
    }

    cout << (possible ? "DA\n" : "NE\n");
    if (possible) {
        for (int i = 0; i < n; i++) {
            cout << a[i] << ' ';
        }
    cout << '\n';
    }
    return 0;
}