#include <iostream>
#include <bits/stdc++.h>

using namespace std;

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

    int t, n, k, m = 0, M = 0;
    cin >> t >> n >> k;

    vector<int> a(n);

    for(int i = 0; i < n; i++){
        cin >> a[i];
    }

    sort(a.begin(), a.end());
    for(int i = 0; i < n; i++){
        if(a[i] >= M) M++;
        else M--;
        
        if(a[a.size()-1-i] >= m) m++;
        else m--;
    }

    if(k >= m && k <= M && abs(k)%2 == n%2){
        cout << "DA" << endl;
        
        if(t == 1){
            /*int c = 0, offset = 0;
            for(int i = 0; c < (k-M)/2; i++){
                int j = a.size()-1-i;
                
                if(a[i] < p[i] && a[j] >= p[i]) offset += 2;
                
                
                swap(a[i], a[a.size()-1-i]);
            }*/
            
            
            int c = 0, r = 0;
            for(int i = 0; i < n; i++){
                if(a[i] >= r) r++;
                else r--;
            }
            
            
            
            for(int i = 0; r != k; i++){
                swap(a[i], a[a.size()-1-i]);
                
                r = 0;
                for(int i = 0; i < n; i++){
                    if(a[i] >= r) r++;
                    else r--;
                }
            }

            for(int i = 0; i < n; i++){
                cout << a[i] << " ";
            }
            cout << endl;
        }
    }
    else cout << "NE" << endl;

    return 0;
}