#include <bits/stdc++.h>
#define int long long
using namespace std;
int n,k,t;
vector<int>a;
signed main()
{
cin>>n>>k>>t;
a.resize(n);
for(int i = 0;i<n;i++)
cin>>a[i];
bool isti=true,jed=true,ai=true;
for(int i = 0;i<n;i++)
if(a[i]!=i+1)
ai=false;
for(int i = 1;i<n;i++)
if(a[i]!=a[i-1])
isti=false;
for(int i = 1;i<n;i++)
if(a[i]!=1&&a[i]!=-1)
jed=false;
if(jed){
if(k>2||k<-1)
cout<<"NE"<<endl;
else{
int cntpl=0,cntmi;
for(int i = 0;i<n;i++)
if(a[i]==1)
cntpl++;
cntmi=n-cntpl;


}




}
else if(isti){
int curr=0;
for(int i = 0;i<n;i++){
if(curr<=a[0])
curr++;
else
curr--;
}
if(curr==k){
cout<<"da"<<endl;
if(t==1)
for(int i = 0;i<n;i++)
cout<<a[i]<<" ";
cout<<endl;
}
}





    return 0;
}