#include<bits/stdc++.h>

using namespace std;

#define INF 1000000007
#define MOD 998244353
#define LINF (1LL << 62)
#define PI 3.14159265358979

typedef long long i64;
typedef pair<int,int> P;

inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

i64 ceil(i64 a, i64 b) { return (a+b-1)/b; }
mt19937_64 rnd(time(NULL));



const int n = 30;
const int Q = 1000;
int e[30][30][4];
int etimes[30][30][4];
int dh[4] = {0,-1,0,1}, dw[4] = {-1,0,1,0};
char dc[4] = {'L','U','R','D'};
map<char, int> dtoi;
void update(string s, int cost, int h, int w){
    int sz = s.size();
    int c = cost / sz;
    for(int i = 0; i < sz; i++){
      int d = dtoi[s[i]];
      etimes[h][w][d]++;
      e[h][w][d] += (c - e[h][w][d]) / (etimes[h][w][d] + 1);
      int nh = h + dh[d];
      int nw = w + dw[d];
      etimes[nh][nw][d ^ 2] = etimes[h][w][d];
      e[nh][nw][d ^ 2] = e[h][w][d];
      h = nh;
      w = nw;
    }
}

void solve(){
  //前処理
  for(int i = 0; i < n; i++){
    for(int j = 0; j < n; j++){
      for(int d = 0; d < 4; d++){
        e[i][j][d] = 1000;
      }
    }
  }
  for (int d = 0; d < 4; d++) {
    dtoi[dc[d]] = d;
  }
  //
  
  for(int t = 0; t < Q; t++){
    int ah, aw, bh, bw;
    cin >> ah >> aw >> bh >> bw;
    
    string ans;
    //
    priority_queue<pair<int, P>, vector<pair<int, P>>, greater<pair<int, P>>> pq;
    pq.push(make_pair(0, P(ah, aw)));
    string s[30][30];
    int mi[30][30];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        mi[i][j] = INF;
      }
    }
    mi[ah][aw] = 0;
    while (!pq.empty()) {
      auto p = pq.top();
      pq.pop();
      int c = p.first;
      int h = p.second.first;
      int w = p.second.second;
      if (h == bh && w == bw) {
        break;
      }
      for (int d = 0; d < 4; d++) {
        int nh = h + dh[d];
        int nw = w + dw[d];
        if (nh < 0 || nw < 0 || nh >= n || nw >= n)
          continue;
        int nc = c + e[h][w][d];
        if (mi[nh][nw] <= nc)
          continue;
        mi[nh][nw] = nc;
        pq.push(make_pair(nc, P(nh, nw)));
        s[nh][nw] = s[h][w];
        s[nh][nw] += dc[d];
      }
    }
    //
    ans = s[bh][bw];
    cout << ans << endl;
    
    int cost;
    cin >> cost;
    //
    update(ans, cost, ah, aw);
    //
  }
}

int main(){
	std::cin.tie(0);
	std::ios::sync_with_stdio(false);
	int t = 1;
	//cin >> t;
	while(t--){
		solve();
	}
	
	return 0;
}
#include<iostream>
#include<vector>
#include<algorithm>
#include<random>
#include<map>
long long int realOdometer = 0;
long long int manhattanOdometer = 0;
long long int generalAverage = 0;
using namespace std;
int main(){
  pair<int, int>s, t;
  map<pair<pair<int, int>, pair<int, int>>, pair<int, int>>distance;
  int loopCount = 0;
  while(cin >> s.first >> s.second >> t.first >> t.second){
    string str = "";
    for(int i=0; i<abs(t.first-s.first); i++){
      str = str + (t.first-s.first>0? "D": "U");
    }
    for(int i=0; i<abs(t.second-s.second); i++){
      str = str + (t.second-s.second>0? "R": "L");
    }
    mt19937 g(loopCount);
    shuffle(str.begin(), str.end(), g);
    if(loopCount<2){
      cout << str << endl;
    }else{
      str.clear();
      pair<int, int>currentPos = s;
      while(currentPos!=t){
        if(currentPos.first==t.first||currentPos.second==t.second){
          if(currentPos.first==t.first){
            str.push_back(currentPos.second<t.second? 'R': 'L');
          }else{
            str.push_back(currentPos.first<t.first? 'D': 'U');
          }
        }else{
          pair<int, int>component0 = make_pair(currentPos.first, currentPos.second + (currentPos.second<t.second? +1: -1));
          pair<int, int>component1 = make_pair(currentPos.first + (currentPos.first<t.first? +1: -1), currentPos.second);
          pair<pair<int, int>, pair<int, int>>candidate0 = make_pair(currentPos, component0);
          pair<pair<int, int>, pair<int, int>>candidate1 = make_pair(currentPos, component1);
          if(candidate0.first>candidate0.second){
            swap(candidate0.first, candidate0.second);
          }
          if(candidate1.first>candidate1.second){
            swap(candidate1.first, candidate1.second);
          }
          int d0 = distance[candidate0].first!=0? distance[candidate0].first: generalAverage;
          int d1 = distance[candidate1].first!=0? distance[candidate1].first: generalAverage;
          if(d0<d1){
            str.push_back(currentPos.second<t.second? 'R': 'L');
          }else{
            str.push_back(currentPos.first<t.first? 'D': 'U');
          }
        }
        currentPos.first+= (str.back()=='D') - (str.back()=='U');
        currentPos.second+= (str.back()=='R') - (str.back()=='L');
      }
      cout << str << endl;
    }
    long long int D;
    cin >> D;
    realOdometer+= D;
    manhattanOdometer+= str.length();
    generalAverage = realOdometer/manhattanOdometer;
    int manhattan_d = str.length();
    vector<pair<pair<int, int>, pair<int, int>>>toDoList;
    for(int i=0; i<manhattan_d; i++){
      pair<int, int>temp1, temp2;
      if(i!=0){
        temp1 = toDoList.back().second;
      }else{
        temp1 = s;
      }
      auto convert = [&](char c){
        pair<int, int> val = temp1;
        if(c=='R'||c=='L'){
          val = make_pair(val.first, val.second + (c=='R'? +1: -1));
        }else{
          val = make_pair(val.first + (c=='D'? +1: -1), val.second);
        }
        return val;
      };
      temp2 = convert(str.at(i));
      toDoList.push_back(make_pair(temp1, temp2));
    }
    while(toDoList.size()!=0){
      if(toDoList.back().first>toDoList.back().second){
        swap(toDoList.back().first, toDoList.back().second);
      }
      distance[toDoList.back()].second++;
      distance[toDoList.back()].first = 
        (distance[toDoList.back()].first * (distance[toDoList.back()].second-1)
        + D/manhattan_d)/distance[toDoList.back()].second;
      toDoList.pop_back();
    }
    loopCount++;
  }
  return 0;
}