#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;

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

    /*set<int> s={-5, -2, 1, 3, 4, 6, 7};
    auto it=s.end();
    //it--;
    cout<<*(it);*/

    ll t, n, k;
    cin>>t>>n>>k;
    multiset<ll> s;
    for(int i=0; i<n; i++)
    {
        ll p;
        cin>>p;
        s.insert(p);
    }
    vector<ll> rds;
    ll rez=0;
    bool moze=true;
    while(!s.empty() && moze)
    {
        if(rez<k)
        {
            auto it=s.lower_bound(rez);
            if(*(it)>=rez)
            {
                rez++;
                rds.pb(*(it));
                s.erase(it);
            }
            else moze=false;
        }
        else if(rez>k)
        {
            auto it=s.lower_bound(rez);
            it--;
            if(*(it)<rez)
            {
                rez--;
                rds.pb(*(it));
                s.erase(it);
            }
            else moze=false;
        }
        else if(rez==k)
        {
            auto it=s.lower_bound(rez);
            if(*(it)>=rez)
            {
                rez++;
                rds.pb(*(it));
                s.erase(it);
            }
            else
            {
                it--;
                if(*(it)<rez)
                {
                    rez--;
                    rds.pb(*(it));
                    s.erase(it);
                }
                else moze=false;
            }
        }
        /*for(auto x: s) cout<<x<<" ";
        cout<<"\n";*/
    }
    if(!moze || rez!=k) cout<<"NE\n";
    else
    {
        cout<<"DA\n";
        if(t==1) for(auto u: rds) cout<<u<<" ";
    }
}