#include <bits/stdc++.h>
using namespace std;
int T, N, K;
int A[200001];
void T0()
{
  if(T) return;
  int mx = 0, mn = 0;
  sort(A + 1, A + N + 1);
  for(int i = 1; i <= N; i++)
  {
    if(mx <= A[i]) mx++;
    else mx--;
  }
  for(int i = N; i >= 1; i--)
  {
    if(mn <= A[i]) mn++;
    else mn--;
  }
  if((K < mn) || (K > mx) || ((K - mn) & 1)) cout << "NE\n";
  else cout << "DA\n";
  exit(0);
}
void Brute()
{
  if(N > 8) return;
  vector <int> V, OUT;
  for(int i = 1; i <= N; i++) V.push_back(A[i]);
  sort(V.begin(), V.end());
  set <int> SET;
  do
  {
    int curr = 0;
    for(int x : V)
    {
      if(curr <= x) curr++;
      else curr--;
    }
    SET.insert(curr);
    if(curr == K) OUT = V;
  }while(next_permutation(V.begin(), V.end()));
  int cnt = 0;
  for(int i = *SET.begin(); i <= *SET.rbegin(); i += 2)
  {
    cnt++;
    if(SET.find(i) == SET.end()) exit(333);
  }
  if(cnt != SET.size()) exit(333);
  if(!OUT.size()) {cout << "NE\n"; exit(0);}
  cout << "DA\n";
  if(!T) exit(0);
  for(int x : OUT) cout << x << ' ';
  cout << '\n';
  exit(0);
}
int main()
{
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> T >> N >> K;
  for(int i = 1; i <= N; i++) cin >> A[i];
  T0();
  Brute();

  return 0;
}