#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"

const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,1,0,-1 };


int main() {
	vector<string>sts;
	string st;
	while (cin >> st) {
		sts.emplace_back(st);
	}
	int asize = sts.size() / 2 + 4;
	vector<vector<vector<int>>>walls(asize, vector<vector<int>>(asize, vector<int>(4)));
	for (int i = 0; i < sts.size() / 2+1; ++i) {
		for (int j = 0; j < sts[2*i].size(); ++j) {
			int num = sts[2*i][j] == '1';
			walls[i+1][j+2][1] = num;
			walls[i + 2][j + 2][3] = num;
		}
	}
	for (int i = 0; i < sts.size() / 2; ++i) {
		for (int j = 0; j < sts[2 * i+1].size(); ++j) {
			int num = sts[2 * i+1][j] == '1';
			walls[i +2][j+1][2] = num;
			walls[i + 2][j + 2][0] = num;
		}
	}
	vector<int>ways;
	int nway = 2;
	int nx = 2;
	int ny = 1;
	while (1) {
		assert(walls[ny][nx][(nway +3) % 4]);
		if (walls[ny][nx][nway]) {
			ways.emplace_back(nway);
			nway = (nway + 1) % 4;
		}
		else if (walls[ny + dy[nway]][nx + dx[nway]][(nway + 3) % 4]) {
			ways.emplace_back(nway);
			ny += dy[nway];
			nx += dx[nway];

			if (ny == 1 && nx == 2)break;
		}
		else if (walls[ny + dy[nway] + dy[(nway + 3) % 4]][nx + dx[nway] + dx[(nway + 3) % 4]][(nway + 2) % 4]) {
			ways.emplace_back(nway);
			//ways.emplace_back((nway + 3) % 4);
			ny += dy[nway] + dy[(nway + 3) % 4];
			nx += dx[nway] + dx[(nway + 3) % 4];
			nway = (nway + 3) % 4;
			if (ny == 1 && nx == 2)break;
		}
		else {
			ways.emplace_back(nway);
			//ways.emplace_back((nway + 3) % 4);
			//ways.emplace_back((nway + 2) % 4);
			ny += dy[(nway + 3) % 4];
			nx += dx[(nway + 3) % 4];
			nway = (nway + 2) % 4;
			if (ny == 1 && nx == 2)break;
		}
		if (nx == 2 && ny == 1)break;
	}
	string mp;
	mp = "LDRU";
	for (auto w : ways) {
		cout << mp[w];
	}
	cout << endl;
	return 0;
}