// takmicenje.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include<vector>
#include<algorithm>
#include<set>
#define pii pair<int,int>
#define MAXN (int)2e5+5
using namespace std;
int a[MAXN],vis[MAXN];
void solve() {
	int t,n,k; cin>>t>>n>>k;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}sort(a+1, a + n+1);
	if ((n + k) % 2) { cout << "NE\n"; return; }
	int l = n-(n+k)/2, r = n - (n + k) / 2 + 1;
	multiset<int>s;
	for (int i = 1; i <= l; i++) {
		s.insert(a[i]);
	}
	int z = 0;
	vector<int>v;
	while (r <= n) {
		while (a[r] < z&&!s.empty()) {
			auto x = s.upper_bound(z);
			if (x == s.begin()) { break; }
			--x;
			if (x == s.end()) { break; }
			v.push_back(*x);
			s.erase(x);
			z--;
		}
		if (a[r] < z) {
			cout << "NE\n"; return;
		}
		z++; r++;
		v.push_back(a[r - 1]);
	}
	while (!s.empty()) {
		auto x = s.rbegin();
		if (*x >= z) {
			cout << "NE\n"; return;
		}
		z--;
		v.push_back(*x);
		s.erase(prev(s.end()));
	}
	cout << "DA\n";
	if (t) {
		for (int& x : v) {
			cout << x << ' ';
		}
	}

}
int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int32_t T = 1;// cin >> T;
	while (T--) {
		solve();
	}
	return 0;
}