#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int dh[]={1,0,-1,0}; int dw[]={0,1,0,-1}; int dist[505][505]; int dist1[505][505]; const int INF=1e9; pair pre[505][505]; pair pre1[505][505]; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); rep(i,505) rep(j,505) dist[i][j]=INF; rep(i,505) rep(j,505) dist1[i][j]=INF; int h,w,k,l,r; cin>>h>>w>>k>>l>>r; vector S(h); rep(i,h) cin>>S[i]; if((r-l)%2==0 || h+w-2>k || (h+w)%2!=k%2){ cout<<"No"<> que; que.push({0,0}); dist[0][0]=0; pre[0][0]={-1,-1}; while(que.size()){ auto t=que.front(); que.pop(); int i=t.first,j=t.second; rep(k,4){ int ni=i+dh[k],nj=j+dw[k]; if(ni<0 || nj<0 || ni>=h || nj>=w) continue; if(S[ni][nj]=='#') continue; if(dist[i][j]+1=h || nj>=w) continue; if(S[ni][nj]=='#') continue; if(dist1[i][j]+1=l) continue; if(dist1[i][j]>k-r) continue; if(j>0 && jni) a+="D"; else if(jni) c+="U"; else if(j0 && i