#include<bits/stdc++.h>
#define for0(i, n) for(int i = 0; i < (n); i++)
using namespace std;
string s[10];
int x, y, d = 1;
bool fU() {
	if (y == 0)return 0;
	else return s[y * 2 - 1][x] == '1';
}
void mU() { cout << "U"; y--; return; }
bool fD() {
	if (y == 4)return 0;
	else return s[y * 2 + 1][x] == '1';
}
void mD() { cout << "D"; y++; return; }
bool fL() {
	if (x == 0)return 0;
	else return s[y * 2][x - 1] == '1';
}
void mL() { cout << "L"; x--; return; }
bool fR() {
	if (x == 4)return 0;
	else return s[y * 2][x] == '1';
}
void mR() { cout << "R"; x++; return; }
signed main() {
	for0(i, 9)cin >> s[i];
	mR();
	while (x + y > 0) {
		for0(i, 4) {
			if ((i + 3 + d) % 4 == 0) {
				if (fU()) { mU(); d = 0; break; }
			}
			else if ((i + 3 + d) % 4 == 1) {
				if (fR()) { mR(); d = 1; break; }
			}
			else if ((i + 3 + d) % 4 == 2) {
				if (fD()) { mD(); d = 2; break; }
			}
			else if ((i + 3 + d) % 4 == 3) {
				if (fL()) { mL(); d = 3; break; }
			}
		}
	}
	printf("\n");
}
