#include<iostream>
#include<vector>
#include<string>
using namespace std;
vector<pair<int, int>>x[10][10]; string S;
int dx[4] = { 0,1,0,-1 }, dy[4] = { 1,0,-1,0 }; char V[5] = "RDLU";
int main() {
	int cnt = 0;
	for (int i = 0; i < 9;i++){
		cin >> S;
		if (i % 2 == 0) {
			for (int j = 0; j < S.size(); j++) {
				if (S[j] == '0')continue;
				x[cnt][j].push_back(make_pair(cnt, j + 1));
				x[cnt][j + 1].push_back(make_pair(cnt, j));
			}
		}
		else {
			for (int j = 0; j < S.size(); j++) {
				if (S[j] == '0')continue;
				x[cnt][j].push_back(make_pair(cnt + 1, j));
				x[cnt + 1][j].push_back(make_pair(cnt, j));
			}
			cnt++;
		}
	}
	int cx = 0, cy = 0, dir = 0;
	while (true) {
		cx += dx[dir]; cy += dy[dir]; cout << V[dir];
		if (cx == 0 && cy == 0)break;
		for (int i = 3; i <= 6; i++) {
			int F = (i + dir) % 4;
			for (int j = 0; j < x[cx][cy].size(); j++) {
				if (x[cx][cy][j] == make_pair(cx + dx[F], cy + dy[F])) {
					dir = F; goto E;
				}
			}
		}
	E:;
	}
	cout << endl;
	return 0;
}