#include <bits/stdc++.h>
using namespace std;
mt19937_64 rng(1);
int T, N, K;
int A[200001];
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--;
    }
    if(curr == K)
    {
//      for(int x : V) cout << x << ' ';
//      cout << '\n';
      OUT = V;
    }
  }while(next_permutation(V.begin(), V.end()));
  for(int x : OUT) cout << x << ' ';
  cout << '\n';
  exit(0);
}
void Permutation()
{
  for(int i = 1; i <= N; i++) if(A[i] != i) return;
  int x = (N + K) >> 1, y = N - x;
  for(int i = N - y; i <= N; i++) cout << i << ' ';
  for(int i = y; i >= 1; i--) cout << i << ' ';
  for(int i = y + 1; i < (N - y); i++) cout << i << ' ';
  cout << '\n';
  exit(0);
}
void Random(int mx)
{
  clock_t END = 0.24 * CLOCKS_PER_SEC;
  int prev = mx;
  while(clock() < END)
  {
    int i = rng() % N + 1;
    int j = rng() % N + 1;
    if(i == j) continue;
    swap(A[i], A[j]);
    int curr = 0;
    for(int i = 1; i <= N; i++)
    {
      if(curr <= A[i]) curr++;
      else curr--;
    }
    if(curr == K)
    {
      for(int i = 1; i <= N; i++) cout << A[i] << " \n"[i == N];
      exit(0);
    }
    if(((prev < K) && (curr < prev)) || ((prev > K) && (curr > prev))) swap(A[i], A[j]);
    prev = curr;
  }
  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];
  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"; return 0;}
  cout << "DA\n";
  if(!T) return 0;
  if(K == mn)
  {
    for(int i = N; i >= 1; i--) cout << A[i] << " \n"[i == 1];
    return 0;
  }
  if(K == mx)
  {
    for(int i = 1; i <= N; i++) cout << A[i] << " \n"[i == N];
    return 0;
  }
  Brute();
  Permutation();
  Random(mx);

  return 0;
}