#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main(){
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
short t; cin >> t;
ll n, k; cin >> n >> k;
ll a[n+4];
bool p = true, q = true;
for ( int i = 0; i < n; i++ ){
    cin >> a[i];
    if ( a[i] != a[0] ){
        p = false;
    }
    if ( a[i] != i+1 ){
        q = false;
    }
}
if ( p == true ){
if ( (n-k)%2 != 0 ){
    cout << "NE";
}
else{
if ( t == 0 ){
            if ( n-1 <= a[0] ){
                if ( k != n ){
                    cout << "NE";
                }
                else{
                    cout << "DA";
                }
            }
            else{
                if ( k == a[0] + (n-a[0])%2 ){
                    cout << "DA";
                }
                else{
                    cout << "NE";
                }
            }
}
else{
            if ( n-1 <= a[0] ){
                if ( k != n ){
                    cout << "NE";
                }
                else{
                    cout << "DA" << endl;
                    for ( int i = 0; i < n; i++ ){
                        cout << a[0] << " ";
                    }
                }
            }
            else{
                if ( k == a[0] + (n-a[0])%2 ){
                    cout << "DA" << endl;
                    for ( int i = 0; i < n; i++ ){
                        cout << a[0] << " ";
                    }
                }
                else{
                    cout << "NE";
                }
            }
    }
}
}
else{
    if( q == true ){
        if ( t == 0 ){
            if ( k >= 0 && (n-k)%2 == 0 ){
                 cout << "DA" << endl;
            }
        }
        else{
            cout << "DA" << endl;
            int t;
            if ( k%2 == 0 ){
                t = k/2;
            }
            else{
                t = (k+1)/2;
            }
            for ( int j = 1; j <= t; j++ ){
                cout << n-j+1 << " ";
            }
            for ( int j = t+1; j <= n-t; j++ ){
                cout << j << " ";
            }
            for ( int j = n-t+1; j <= n; j++ ){
                cout << n-j+1 << " ";
            }
            cout << endl;
        }
    }
}


return 0;
}