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

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