#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
    int t, n, k,p;
    cin >> t >> n >> k;
    vector<int> a(n);
    for (size_t i = 0; i < n; i++)
    {
        cin >> p;
        a[i] = p;
    }
    sort(a.begin(), a.end());
    int kiki = 0;
    for (size_t i = 0; i < n; i++)
    {
        if (kiki <= a[i])
            kiki++;
        else
            kiki--;
    }
    if (kiki == k)
    {
        cout << "DA";
        if (t == 1)
        {
            cout << '\n';
            for (size_t i = 0; i < n; i++)
            {
                cout << a[i] << " ";
            }
        }
    }
    else
    {
        cout << "NE";
    }
    /*if (k > 0 && k % 2 == n % 2)
    {
        cout << "DA" << '\n';
        if (t == 1)
        {
            int r = (n + 1) / 2 - (k - 1)/2;
            for (size_t i = r; i <= n; i++)
            {
                cout << a[i - 1] << " ";
            }
            for (int i = r - 1; i >= 1; i--)
            {
                cout << a[i-1]<< " ";
            }
        }
    }
    else
    {
        cout << "NE";
    }*/
}