#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 max = 0;
    for (size_t i = 0; i < n; i++)
    {
        if (max <= a[i])
            max++;
        else
            max--;

    }
    int min = 0;
    for (int i = n - 1; i > -1; i--)
    {
        if (min <= a[i])
            min++;
        else
            min--;
    }
    if (min <= k && k <= max && k % 2 == max % 2)
    {
        cout << "DA" << '\n';
        if (t == 1)
        {
            int r = (max + 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";
    }
}