#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
using PP = pair<int, P>;

const int N = 30;
int T = 0;
int cost[N][N][N][N];
int updated_time[N][N][N][N];
int updates[N][N][N][N];
int visited[N][N][N][N];

char dir(int dx, int dy) {
    if (dx == 0) {
        if (dy > 0) return 'R';
        else return 'L';
    } else {
        if (dx > 0) return 'D';
        else return 'U';
    }
}

pair<vector<P>, string> shortestPath(int sx, int sy, int tx, int ty) {
    vector<vector<int>> dist(N, vector<int>(N, 10000000));
    vector<vector<P>> prev(N, vector<P>(N));
    dist[sx][sy] = 0;

    priority_queue<PP, vector<PP>, greater<PP>> q;
    q.emplace(PP(0, P(sx, sy)));

    vector<int> dx = {-1, 1, 0, 0};
    vector<int> dy = {0, 0, -1, 1};

    while (!q.empty()) {
        PP p = q.top();
        q.pop();
        int d = p.first;
        int x = p.second.first;
        int y = p.second.second;

        if (d > dist[x][y]) continue;

        for (int i = 0; i < 4; i++) {
            int nx = x + dx[i];
            int ny = y + dy[i];
            if (nx < 0 || nx >= N || ny < 0 || ny >= N) continue;
            d = cost[x][y][nx][ny];

            if (T < 250) {
                // if (T < 10 && ((x + y + T) & 1)) d = 10000;
                if (visited[x][y][nx][ny]) d = 10000;
            }

            if (dist[nx][ny] > dist[x][y] + d) {
                dist[nx][ny] = dist[x][y] + d;
                prev[nx][ny] = P(x, y);
                q.push(PP(dist[nx][ny], P(nx, ny)));
            }
        }
    }

    vector<P> res;
    string out;

    int x, y;
    x = tx; y = ty;

    while (x != sx || y != sy) {
        res.push_back(P(x, y));
        int px, py;
        P prv = prev[x][y];
        px = prv.first;
        py = prv.second;

        visited[x][y][px][py] = 1;
        visited[px][py][x][y] = 1;

        // for (int i = 0; i < 4; i++) {
        //     int nx = x + dx[i];
        //     int ny = y + dy[i];
        //     if (nx < 0 || nx >= N || ny < 0 || ny >= N) continue;

        //     visited[x][y][nx][ny] = 1;
        //     visited[nx][ny][x][y] = 1;
        //     visited[px][py][nx][ny] = 1;
        //     visited[nx][ny][px][py] = 1;
        // }

        out += dir(x - px, y - py);
        x = px; y = py;
    }

    res.push_back(P(sx, sy));

    reverse(out.begin(), out.end());

    return pair<vector<P>, string>(res, out);
}

void updateCost(vector<P> v, int dist) {
    for (int i = 0; i < (int)v.size() - 1; i++) {
        int x = v[i].first; int y = v[i].second;
        int nx = v[i + 1].first; int ny = v[i + 1].second;
        int up = updates[x][y][nx][ny];
        double r = 1.0 / (1 + up) + (1 - 1.0 / (up + 1)) / (1 + exp(v.size() - 2));
        cost[x][y][nx][ny] = (int)(cost[x][y][nx][ny] * (1 - r) + dist * r);
        cost[nx][ny][x][y] = cost[x][y][nx][ny];
        updates[x][y][nx][ny]++;
        updated_time[x][y][nx][ny] = T;
    }
}

int main() {
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            for (int k = 0; k < N; k++) {
                for (int l = 0; l < N; l++) {
                    cost[i][j][k][l] = 5000;
                }
            }
        }
    }

    while (T < 1000) {
        int sx, sy, tx, ty;
        cin >> sx >> sy >> tx >> ty;
        auto [vertices, path] = shortestPath(sx, sy, tx, ty);
        cout << path << endl << flush;
        int dist;
        cin >> dist;
        updateCost(vertices, dist / (vertices.size() - 1));
        T++;
    }
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vz;
typedef vector<vz> vvz;
typedef pair<ll, ll> pll;
#define sz(x) ll((x).size())
#define fo(i,n) for(ll i=0; i<(n); i++)
#define FO(i,a,b) for(ll i=(a); i!=(b); i+=(b)>(a)?1:-1)
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(c) c.begin(), c.end()
#define F first
#define S second
#define os(x) cout<<x<<' '
#define on(x) cout<<x<<"\n"
#define nl cout<<"\n"
#define maxe(x) max_element(all(x))-(x).begin()
#define mine(x) min_element(all(x))-(x).begin()
const ll P=998244353;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("C:\\Users\\ASISH\\Desktop\\coding\\input1.txt", "r", stdin);
	freopen("C:\\Users\\ASISH\\Desktop\\coding\\output1.txt", "w", stdout);
#endif

	ll h, k, x, y, ans;
	cin>>h>>k>>x>>y;
	x=x-h, y=y-k, h=0, k=0;
	if(x==0 && y==0) ans=0;
	else if(abs(x)+abs(y)<=3 || abs(x)==abs(y)) ans=1;
	else if((y>=x-3 && y<=x+3) || (y>=-x-3 && y<=-x+3)) ans=2;
	else{
		if((x+y)%2) ans=3;
		else ans=2;
	}
	on(ans);
	cerr << "Time : " << ((double)clock()) / (double)CLOCKS_PER_SEC << "s\n";
	return 0;
}