#include using namespace std; #define int long long signed main(){ int H,W,K,L,R; cin>>H>>W>>K>>L>>R; vector> S(H,vector(W)); for(int i=0;i>S[i][j]; vector> G(H*W); for(int i=0;i dist(H*W,1e18); dist[0] = 0; queue q; q.push(0); while(!q.empty()){ int pos = q.front(); q.pop(); for(int x:G[pos]){ if(dist[x] != 1e18) continue; dist[x] = dist[pos] + 1; q.push(x); } } if(dist[H*W-1] == 1e18 || dist[H*W-1]%2 != K%2 || (R-L)%2 == 0){ cout<<"No"<= L || dist[H*W-1]-dist[i*W+j] > K-R || dist[i*W+j]%2 == L%2 || (dist[H*W-1]-dist[i*W+j])%2 != (K-R)%2 || dist[i*W+j] == 1e18) continue; bool a = (i != 0 && i != H-1 && S[i-1][j] == '.' && S[i+1][j] == '.'); bool b = (j != 0 && j != W-1 && S[i][j-1] == '.' && S[i][j+1] == '.'); if(a){ cout<<"Yes"< distt(H*W,1e18); distt[i*W+j] = 0; q.push(i*W+j); while(!q.empty()){ int pos = q.front(); q.pop(); for(int x:G[pos]){ if(distt[x] != 1e18) continue; distt[x] = distt[pos] + 1; q.push(x); } } while(now != i*W+j){ for(int x:G[now]){ if(distt[x]+1 == distt[now]){ if(x == now-1) t += 'R'; if(x == now+1) t += 'L'; if(x == now-W) t += 'D'; if(x == now+W) t += 'U'; now = x; break; } } } for(int k=dist[i*W+j]+1;k distt(H*W,1e18); distt[i*W+j] = 0; q.push(i*W+j); while(!q.empty()){ int pos = q.front(); q.pop(); for(int x:G[pos]){ if(distt[x] == 1e18) continue; distt[x] = distt[pos] + 1; q.push(x); } } while(now != i*W+j){ for(int x:G[now]){ if(distt[x]+1 != distt[now]){ if(x == now-1) t += 'R'; if(x == now+1) t += 'L'; if(x == now-W) t += 'D'; if(x == now+W) t += 'U'; now = x; break; } } } for(int k=dist[i*W+j]+1;k