#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int, int>P;

int dx[]{ 0,1,0,-1 }, dy[]{ 1,0,-1,0 };
char dir[] = "RDLU";
int main() {
	vector<pair<P, P>>v;
	rep(i, 9) {
		rep(j, i & 1 ? 5 : 4) {
			int d; scanf("%1d", &d);
			if (d) {
				if (i & 1)v.push_back({ {i / 2,j},{i / 2 + 1,j} });
				else v.push_back({ {i / 2,j},{i / 2,j + 1} });
			}
		}
	}
	sort(v.begin(), v.end());
	int id = 0, x = 0, y = 0;
	do {
		int nx = x + dx[(id + 3) % 4], ny = y + dy[(id + 3) % 4];
		P a(x, y), b(nx, ny); if (a > b)swap(a, b);
		if (binary_search(v.begin(), v.end(), make_pair(a, b))) {
			id = (id + 3) % 4; x += dx[id]; y += dy[id];
		}
		else {
			nx = x + dx[id], ny = y + dy[id];
			P a(x, y), b(nx, ny); if (a > b)swap(a, b);
			if (!binary_search(v.begin(), v.end(), make_pair(a, b))) {
				id = (id + 1) % 4; x += dx[id]; y += dy[id];
			}
			else {
				x += dx[id]; y += dy[id];
			}
		}
		printf("%c", dir[id]);
	} while (x != 0 || y != 0);
	printf("\n");
}