#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int h[33][33];
int v[33][33];
int main() {
	for (int i = 0; i < 30; i++) {
		for (int j = 0; j < 30; j++) {
			h[i][j] = 5000;
		}
	}
	for (int i = 0; i < 1000; i++) {
		int sx, sy, gx, gy, score;
		cin >> sx >> sy >> gx >> gy;
		pair<int,int> prev[33][33];
		int dist[33][33];
		for (int i = 0; i < 30; i++) {
			for (int j = 0; j < 30; j++) {
				dist[i][j] = 1000000007;
			}
		}
		bool bo[33][33] = { true };
		priority_queue<tuple<int, int, int>, vector<tuple<int, int, int>>, greater<tuple<int, int, int>>> que;
		que.push(make_tuple(0, sx, sy));
		bo[sx][sy] = true;
		dist[sx][sy] = 0;
		while (!que.empty()) {
			tuple<int, int, int> t = que.top();
			int x = get<0>(t);
			int y = get<1>(t);
			int z = get<2>(t);
			que.pop();
			if (y == gx && z == gy)break;
			if (dist[y][z] < x)continue;
			if (y != 29) {
				if (dist[y + 1][z] > dist[y][z] + h[y][z]) {
					dist[y + 1][z] = dist[y][z] + h[y][z];
					prev[y + 1][z] = make_pair(y, z);
					que.push(make_tuple(dist[y][z] + h[y][z], y + 1, z));
				}
			}
			if (y != 0) {
				if (dist[y - 1][z] > dist[y][z] + h[y - 1][z]) {
					dist[y - 1][z] = dist[y][z] + h[y - 1][z];
					prev[y - 1][z] = make_pair(y, z);
					que.push(make_tuple(dist[y][z] + h[y - 1][z], y - 1, z));
				}
			}
			if (z != 29) {
				if (dist[y][z + 1] > dist[y][z] + v[y][z]) {
					dist[y][z + 1] = dist[y][z] + v[y][z];
					prev[y][z + 1] = make_pair(y, z);
					que.push(make_tuple(dist[y][z] + v[y][z], y, z + 1));
				}
			}
			if (z != 0) {
				if (dist[y][z - 1] > dist[y][z] + v[y][z - 1]) {
					dist[y][z - 1] = dist[y][z] + v[y][z - 1];
					prev[y][z - 1] = make_pair(y, z);
					que.push(make_tuple(dist[y][z] + v[y][z - 1], y, z - 1));
				}
			}
		}
		int nx = gx, ny = gy, co = 0;
		vector<tuple<int, int, int>> edge;
		string ans = "";
		while (nx != sx || ny != sy) {
			if (nx - prev[nx][ny].first == 1) {
				ans += 'D';
				edge.emplace_back(make_tuple(0, prev[nx][ny].first, prev[nx][ny].second));
			}
			if (nx - prev[nx][ny].first == -1) {
				ans += 'U';
				edge.emplace_back(make_tuple(0, nx, ny));
			}
			if (ny - prev[nx][ny].second == 1) {
				ans += 'R';
				edge.emplace_back(make_tuple(1, prev[nx][ny].first, prev[nx][ny].second));
			}
			if (ny - prev[nx][ny].second == -1) {
				ans += 'L';
				edge.emplace_back(make_tuple(1, nx, ny));
			}
			int nx1 = nx;
			nx = prev[nx][ny].first;
			ny = prev[nx1][ny].second;
			co++;
		}
		reverse(ans.begin(), ans.end());
		cout << ans << endl;
		cin >> score;
		if (score < 5000 * co) {
			for (int j = 0; j < co; j++) {
				tuple<int, int, int> t = edge[j];
				int x = get<0>(t);
				int y = get<1>(t);
				int z = get<2>(t);
				if (x) {
					h[y][z] = 4999;
				}
				else {
					v[y][z] = 4999;
				}
			}
		}
		else if (score > 5000 * co) {
			for (int j = 0; j < co; j++) {
				tuple<int, int, int> t = edge[j];
				int x = get<0>(t);
				int y = get<1>(t);
				int z = get<2>(t);
				if (x) {
					h[y][z] = 5001;
				}
				else {
					v[y][z] = 5001;
				}
			}
		}
	}
}

#include<bits/stdc++.h>
#define y1 qwq
using namespace std;

const int maxn=35;

int x1,y1,x2,y2;
int f[maxn][maxn];
int tol[maxn][maxn];
int tod[maxn][maxn];
int sum[maxn][maxn];
double v[maxn][maxn];
char p[maxn][maxn];
string s;

void dfs(int x,int y) {
	if(x==x1&&y==y1) {
		return ;
	}
	if(p[x][y]=='U') {
		dfs(x+1,y);
	} else if(p[x][y]=='D') {
		dfs(x-1,y);
	} else if(p[x][y]=='L') {
		dfs(x,y+1);
	} else {
		dfs(x,y-1);
	}
//	cout<<p[x][y];
	s+=p[x][y];
}

void dfs2(int x,int y,int k) {
	if(x==x1&&y==y1) {
		return ;
	}
	if(p[x][y]=='U') {
		dfs2(x+1,y,k);
	} else if(p[x][y]=='D') {
		dfs2(x-1,y,k);
	} else if(p[x][y]=='L') {
		dfs2(x,y+1,k);
	} else {
		dfs2(x,y-1,k);
	}
  	if(!v[x][y]) {
        v[x][y]=k;
    } else {
        v[x][y]=(v[x][y]+k)/1;
    }
}

string query() {
	memset(f,0x3f,sizeof(f));
	memset(p,0,sizeof(p));
	f[x1][y1]=0;
	s="";
	if(x1<=x2&&y1<=y2) {
		for(int i=x1; i<=x2; i++) {
			for(int j=y1; j<=y2; j++) {
				if(i==x1&&j==y1) {
					continue;
				}
				if(f[i-1][j]<f[i][j-1]) {
					f[i][j]=f[i-1][j]+v[i][j];
					p[i][j]='D';
				} else {
					f[i][j]=f[i][j-1]+v[i][j];
					p[i][j]='R';
				}
			}
		}
	} else if(x1>=x2&&y1<=y2) {
		for(int i=x1; i>=x2; i--) {
			for(int j=y1; j<=y2; j++) {
				if(i==x1&&j==y1) {
					continue;
				}
				if(f[i+1][j]<f[i][j-1]) {
					f[i][j]=f[i+1][j]+v[i][j];
					p[i][j]='U';
				} else {
					f[i][j]=f[i][j-1]+v[i][j];
					p[i][j]='R';
				}
			}
		}
	} else if(x1>=x2&&y1>=y2) {
		for(int i=x1; i>=x2; i--) {
			for(int j=y1; j>=y2; j--) {
				if(i==x1&&j==y1) {
					continue;
				}
				if(f[i+1][j]<f[i][j+1]) {
					f[i][j]=f[i+1][j]+v[i][j];
					p[i][j]='U';
				} else {
					f[i][j]=f[i][j+1]+v[i][j];
					p[i][j]='L';
				}
			}
		}
	} else {
		for(int i=x1; i<=x2; i++) {
			for(int j=y1; j>=y2; j--) {
				if(i==x1&&j==y1) {
					continue;
				}
				if(f[i-1][j]<f[i][j+1]) {
					f[i][j]=f[i-1][j]+v[i][j];
					p[i][j]='D';
				} else {
					f[i][j]=f[i][j+1]+v[i][j];
					p[i][j]='L';
				}
			}
		}
	}
	dfs(x2,y2);
	return s;
}

int compute_path_length(string s) {
	int x=x1,y=y1,ans=0;
	for(int i=0; i<s.length(); i++) {
		if(s[i]=='D') {
			ans+=tod[x][y];
			x++;
		} else if(s[i]=='L') {
			ans+=tol[x][y-1];
			y--;
		} else if(s[i]=='R') {
			ans+=tol[x][y];
			y++;
		} else {
			ans+=tod[x-1][y];
			x--;
		}
	}
	return ans;
}

int main() {
//	freopen("d.in","r",stdin);
//	freopen("d.out","w",stdout);
	int LOCAL_TEST=0;
	if (LOCAL_TEST) {
//        read_h_v();
		for(int i=1; i<=30; i++) {
			for(int j=1; j<=29; j++) {
				cin>>tol[i][j];
			}
		}
		for(int i=1; i<=29; i++) {
			for(int j=1; j<=30; j++) {
				cin>>tod[i][j];
			}
		}
	}
	double prev_result = 0;
	double score = 0.0;
	for (int k = 0; k < 1000; k++) {
		double a,e;
		if (LOCAL_TEST) {
//            read_s_t_a_e();
			cin>>x1>>y1>>x2>>y2>>a>>e;
		} else {
			cin>>x1>>y1>>x2>>y2;
		}
		x1++,y1++,x2++,y2++;
		string path = query();
//        print(path);
		cout<<path<<"\n";
		fflush(stdout);
		if (LOCAL_TEST) {
			double b = compute_path_length(path);
			score = score * 0.998 + a / b;
			prev_result = round(b * e);
		} else {
			cin>>prev_result;
		}
		dfs2(x2,y2,prev_result/(abs(x1-x2)+abs(y1-y2)));
	}
	if (LOCAL_TEST) {
		cout<<(int)round(2312311 * score);
	}
	return 0;
}
