#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int t, n, k;
int niz[200005];
bool sviIsti = false;
int main()
{
    cin >> t;
    cin >> n >> k;
    for(int i = 1; i <= n; i++){
        cin >> niz[i];
    }
    sort(niz + 1, niz + n + 1);
    if(k == 1){
        if((k >= niz[1] + 2) or (k <= niz[1] - 2));
            cout << "NE" << endl;
        else if(abs(k - niz[1]) == 1){
            int povecavanje = abs(niz[1]) + 1;
            if((n - povecavanje) % 2 == 0){
                cout << "DA" << endl;
                if(t == 1){
                    for(int i = 1; i <= n; i++)
                        cout << niz[i] << " ";
                }
            }
        }
    }
    return 0;
}