#include <bits/stdc++.h>
#define pb push_back
#define ll long long int
#define pi pair<int, int>
#define all(x) x.begin(), x.end()

using namespace std;

ll k;

void Probajsve(ll ind, ll n, vector<ll>& a, vector<bool>& visited, vector<ll>& rds, vector<ll>& res, bool& mz)
{
    if(mz) return;
    if(ind>=n)
    {
        //cout<<"usao\n";
        ll rez=0;
        for(int i=0; i<n; i++)
        {
            if(rds[i]>=rez) rez++;
            else rez--;
            //cout<<rds[i]<<" ";
        }
        //cout<<"\n";
        if(rez==k)
        {
            for(int i=0; i<n; i++) res[i]=rds[i];
            mz=true;
        }
        return;
    }
    for(int i=0; i<n; i++)
    {
        if(mz) return;
        if(!visited[i])
        {
            visited[i]=true;
            rds[ind]=a[i];
            Probajsve(ind+1, n, a, visited, rds, res, mz);
            visited[i]=false;
            rds[ind]=0;
        }
    }
}

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

    ll t, n;
    cin>>t>>n>>k;
    vector<ll> a(n);
    //bool tc1=true, tc3=true, tc4=true;
    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        /*if(a[i]!=a[0])
        {
            tc1=false;
        }*/
        //if(a[i]!=1 && a[i]!=-1) tc3=false;
        //if(a[i]!=i) tc4=false;
    }
    sort(all(a));
    /*ll maxrez=0;
    vector<ll> b(n);
    for(int i=0; i<n; i++)
    {
        if(a[i]>=maxrez) maxrez++;
        else maxrez--;
        b[i]=a[i];
    }
    sort(all(b), greater<int>());
    //for(auto x:a) cout<<x;
    ll minrez=0;
    for(int i=0; i<n; i++)
    {
        if(b[i]>=minrez) minrez++;
        else minrez--;
    }*/
    /*if(k>maxrez || k<minrez) cout<<"NE\n";
    else
    {
        if((abs(k)%2)!=abs(maxrez%2)) cout<<"NE\n";
        else
        {
            cout<<"DA\n";

        }
    }*/
    ll cuvj=-1;
    for(int j=1; j<=n && cuvj==-1; j++)
    {
       ll rez=0;
       for(int i=n-j; i<n; i++)
       {
           if(a[i]>=rez) rez++;
           else rez--;
       }
       for(int i=0; i<n-j; i++)
       {
           if(a[i]>=rez) rez++;
           else rez--;
       }
       if(rez==k)
       {
           cuvj=j;
       }
    }
    if(cuvj==-1) cout<<"NE\n";
    else
    {
        cout<<"DA\n";
        if(t==1)
        {
            for(int i=n-cuvj; i<n; i++)
            {
                cout<<a[i]<<" ";
            }
            for(int i=0; i<n-cuvj; i++)
            {
                cout<<a[i]<<" ";
            }
        }
    }

}