#include <iostream>
#include <algorithm>

using namespace std;

int ocena(int *i, int *j) {
    int rez = 0;
    while(i < j) {
        if(rez <= *i)
            rez++;
        else
            rez--;
        i++;
    }
    return rez;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    int t, n, k;
    cin >> t >> n >> k;
    int a[n];
    for(int i = 0; i < n; i++)
        cin >> a[i];
    
    sort(a, a + n, greater<int>());
    int najmanjaOcena = ocena(a, a + n);
    
    sort(a, a + n);
    int najvecaOcena = ocena(a, a + n);
    
    if(najmanjaOcena <= k && k <= najvecaOcena && ((n & 1) == (k & 1))) {
        cout << "DA\n";
        if(t)
            for(int i = 0; i < n; i++)
                cout << a[i] << ' ';
    }else
        cout << "NE\n";
    
    
    return 0;
}