#include <bits/stdc++.h>
using namespace std;

const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
const char ch[] = {"ULDR"};

bool g[10][10][10][10];

int main()
{
	char c;
	
	for (int i = 1; i <= 5; i++){
		for (int j = 1; j <= 4; j++){
			scanf(" %c", &c);
			if (c == '0') continue;
			g[i][j][i][j + 1] = true;
			g[i][j + 1][i][j] = true;
		}
		if (i == 5) continue;
		for (int j = 1; j <= 5; j++){
			scanf(" %c", &c);
			if (c == '0') continue;
			g[i][j][i + 1][j] = true;
			g[i + 1][j][i][j] = true;
		}
	}
	
	int dir = 3;
	int x = 1, y = 2;
	while (true){
		printf("%c", ch[dir]);
		if (x == 1 && y == 1) break;
		for (int t = 1; t >= -1; t--){
			int nd = (dir + t + 4) % 4;
			int nx = x + dx[nd];
			int ny = y + dy[nd];
			if (g[x][y][nx][ny]){
				x = nx;
				y = ny;
				dir = nd;
				break;
			}
		}
	}
	puts("");
	return 0;
}