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

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t, n, k, x, a, b;
    cin >> t >> n >> k;
    priority_queue<int> pq;
    priority_queue<int, vector<int>, greater<int>> pq1, pq2;
    vector<int> v;
    for (int i = 0; i < n; i++){
        cin >> x;
        pq.push(x);
    }
    for (int i = 0; i < k + (n - k) / 2; i++){
        pq1.push(pq.top());
        pq.pop();
    }
    while (!pq.empty()){
        pq2.push(pq.top());
        pq.pop();
    }
    x = 0;
    while (!pq1.empty() || !pq2.empty()){
        if (!pq1.empty() && x <= pq1.top()){
            x++;
            v.push_back(pq1.top());
            pq1.pop();
        }
        else if (!pq2.empty() && x > pq.top()){
            x--;
            v.push_back(pq2.top());
            pq2.pop();
        }
        else if (pq2.empty()){
            x--;
            v.push_back(pq1.top());
            pq1.pop();
        }
        else if (pq1.empty()){
            x++;
            v.push_back(pq2.top());
            pq2.pop();
        }
        else {
            a = pq1.top();
            b = pq2.top();
            pq1.pop();
            pq2.pop();
            pq1.push(b);
            pq2.push(a);
        }
    }
    if (x == k){
        cout << "DA\n";
        if (t == 1){
            for (int i : v){
                cout << i << " ";
            }
        }
    }
    else {
        cout << "NE";
    }
    return 0;
}