#include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <random>
#include <vector>
using namespace std;

constexpr int N = 30;  // width and height
constexpr int MED_DISTANCE = (1000 + 9000) / 2;
using P = pair<int, int>;
using VPATH = array<array<int, N>, N - 1>;
using HPATH = array<array<int, N - 1>, N>;

mt19937 rng{random_device{}()};

// 上下移動、左右移動の回数を渡すとそこに移動するUDLRパスを返す
// 1,2→DRR
// -2,3→UULLL
string getUDLRpath(int vmove, int hmove) {
    string path;
    path += string(abs(vmove), vmove > 0 ? 'D' : 'U');
    path += string(abs(hmove), hmove > 0 ? 'R' : 'L');
    return path;
}

class Solver {
   private:
    VPATH h{};
    HPATH w{};

    string prev_path;
    P prev_s, prev_t;

    int evaluate(const string &path, P s) {
        int length = 0;
        for (auto &&i : path) {
            switch (i) {
                case 'U':
                    length += h[s.first - 1][s.second];
                    s.first--;
                    break;

                case 'D':
                    length += h[s.first][s.second];
                    s.first++;
                    break;

                case 'L':
                    length += w[s.first][s.second - 1];
                    s.second--;
                    break;

                case 'R':
                    length += w[s.first][s.second + 1];
                    s.second++;
                    break;

                default:
                    break;
            }
        }
        return length;
    }

    void reflectResult(const string &path, P s, int prev_result) {
        if (path.size() == 0) return;
        const int inc = prev_result / path.size() - MED_DISTANCE;

        for (auto &&i : path) {
            switch (i) {
                case 'U':
                    h[s.first - 1][s.second] += inc;
                    s.first--;
                    break;

                case 'D':
                    h[s.first][s.second] += inc;
                    s.first++;
                    break;

                case 'L':
                    w[s.first][s.second - 1] += inc;
                    s.second--;
                    break;

                case 'R':
                    w[s.first][s.second] += inc;
                    s.second++;
                    break;

                default:
                    break;
            }
        }
    }

   public:
    string query(P s, P t, int prev_result) {
        if (prev_path.size() > 0) reflectResult(prev_path, prev_s, prev_result);

        const int vmove = t.first - s.first, hmove = t.second - s.second;

        const string init_path = getUDLRpath(vmove, hmove);

        vector<string> choices;
        string tmp_path = init_path;
        for (int i = 0; i < 2000; i++) {
            shuffle(tmp_path.begin(), tmp_path.end(), rng);
            choices.emplace_back(tmp_path);
        }

        string path = choices.front();
        for (auto &&c : choices) {
            if (evaluate(c, s) < evaluate(path, s)) {
                path = c;
            }
        }

        prev_s = s, prev_t = t;
        prev_path = path;

        return path;
    }
};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int prev_result = 0;
    Solver sol;  // ソルバー

    // 各クエリを処理
    for (int k = 0; k < 1000; k++) {
        // s, t受け取り
        P s, t;
        cin >> s.first >> s.second >> t.first >> t.second;

        // パス計算 出力
        const string path = sol.query(s, t, prev_result);
        cout << path << endl;

        // 結果受け取り
        cin >> prev_result;
    }
}

#include <bits/stdc++.h>
using namespace std;
#define rep0(i,n) for(int (i) = 0; (i) < (n); ++(i))
#define pf(x) cout << (x) << endl
#define all(x) (x).begin(),(x).end()
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; }
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
const char mc[4]={'U','L','D','R'};
const int max_e = 9000;
const int inf = 1000000000;
int mh[29][29],mv[29][29];

int dijkstra(vector<vector<int> > &m, pair<int, int> s){
    priority_queue<pair<int,pair<int,int> >, vector<pair<int,pair<int,int> > >, greater<pair<int,pair<int,int> > > > next;
    next.push(make_pair(0,s));
    while (!next.empty()) {
        int x = next.top().second.first,y = next.top().second.second;
        int p = next.top().first;
        next.pop();
        if(x > 0){
            if(chmin(m[x - 1][y], p + mv[x - 1][y])){
                next.push(make_pair(p + mv[x - 1][y], make_pair(x - 1, y)));
            }
        }
        if(x < 29){
            if(chmin(m[x + 1][y], p + mv[x][y])){
                next.push(make_pair(p + mv[x][y], make_pair(x + 1, y)));
            }
        }
        if(y > 0){
            if(chmin(m[x][y - 1], p + mv[x][y - 1])){
                next.push(make_pair(p + mv[x][y - 1], make_pair(x, y - 1)));
            }
        }
        if(y < 29){
            if(chmin(m[x][y + 1], p + mv[x][y])){
                next.push(make_pair(p + mv[x][y], make_pair(x, y + 1)));
            }
        }
    }
    return 0;
}

string restore(vector<vector<int> > &m, int x, int y){
    string root = "";
    int s = 0;
    while (m[x][y] != 0) {
        ++s;
        int next_x = x,next_y = y,p = m[x][y];
        rep0(i, 4)if(chmin(p, m[min(max(0,x + dx[i]),29)][min(max(0,y + dy[i]),29)])){
            next_x = x + dx[i];
            next_y = y + dy[i];
            if(s != root.size())root.push_back(mc[i]);
            else root[s - 1] = mc[i];
        }
        x = next_x;
        y = next_y;
    }
    reverse(all(root));
    return root;
}

int update(string s, int p, int x, int y){
    rep0(i, s.size()){
        if(s[i] == 'U'){
            mv[x - 1][y] = (mv[x - 1][y] + p + 1) / 2;
            x--;
        }else if(s[i] == 'D'){
            mv[x][y] = (mv[x][y] + p + 1) / 2;
            x++;
        }else if(s[i] == 'R'){
            mh[x][y] = (mh[x][y] + p + 1) / 2;
            y++;
        }else{
            mh[x][y - 1] = (mh[x][y - 1] + p + 1) / 2;
            y--;
        }
    }
    return 0;
}

//modを確認すること
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    rep0(i, 30)rep0(j, 30){
        mh[i][j] = max_e;
        mv[i][j] = max_e;
    }
    
    rep0(i, 1000){
        vector<vector<int> > m(30,vector<int>(30,inf));
        int sx,sy,gx,gy,p;
        string s = "";
        cin >> sx >> sy >> gx >> gy;
        m[sx][sy] = 0;
        
        dijkstra(m, make_pair(sx, sy));
        string ans = restore(m, gx, gy);
        
        pf(ans);
        
        cin >> p;
        update(ans, int((p + ans.size() - 1) / ans.size()), sx, sy);
    }
    return 0;
}
