#include <string>
#include <iostream>
using namespace std;
int dir[] = { 0, 1, 0, -1 };
string e = "RDLU";
string s[9]; bool d[6][6][4];
int main() {
	for (int i = 0; i < 9; i++) cin >> s[i];
	for (int i = 0; i < 5; i++) {
		for (int j = 0; j < 4; j++) {
			if (s[i * 2][j] == '1') d[i][j + 1][1] = d[i + 1][j + 1][3] = true;
		}
	}
	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 5; j++) {
			if (s[i * 2 + 1][j] == '1') d[i + 1][j][0] = d[i + 1][j + 1][2] = true;
		}
	}
	string ret = "R";
	int x = 0, y = 1, dr = 0;
	while (true) {
		if (d[x][y][dr]) dr = (dr + 3) & 3, ret += e[dr];
		else {
			x += dir[dr], y += dir[dr ^ 1];
			if (x == 1 && y == 0) break;
			if (!d[x][y][(dr + 1) & 3]) {
				dr = (dr + 1) & 3;
				x += dir[dr], y += dir[dr ^ 1]; ret += e[dr];
			}
			else ret += e[dr];
		}
	}
	cout << ret << endl;
	return 0;
}