#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

typedef enum _DIRECTION { dU, dR, dD, dL, DIR_MAX } DIR;

const int MAX_N = 5;
const int MAX_D = 4;

bool mat[MAX_N][MAX_N][MAX_D];

int main ( void )
{
	for (int i = 0; i < MAX_N; ++i) {
		for (int j = 0; j < MAX_N; ++j) {
			fill(mat[i][j], mat[i][j]+MAX_D, false);
		}
	}

	for (int i = 0; i < 9; ++i) {
		string str;
		cin >> str;

		if (i & 1) {
			for (int j = 0, J = str.size(); j < J; ++j) {
				mat[i/2][j][dD] = (str[j] == '1');
				if (i/2+1 < MAX_N) {
					mat[i/2+1][j][dU] = (str[j] == '1');
				}
			}
		}
		else {
			for (int j = 0, J = str.size(); j < J; ++j) {
				mat[i/2][j][dR] = mat[i/2][j+1][dL] = (str[j] == '1');
			}
		}
	}

	char c_dir[] = "URDL";
	int dx[] = { 0, 1, 0, -1 }, dy[] = { -1, 0, 1, 0 };
	DIR dir = dU;
	int x = 0, y = 0;
	bool hit = true;

	while (hit) {
		hit = false;
		for (int i = 0; i < DIR_MAX; ++i) {
			DIR next = (DIR)((dir + DIR_MAX - 1 + i) % DIR_MAX);
			if (mat[y][x][next]) {
				dir = next;
				mat[y][x][dir] = false;
				cout << c_dir[dir];
				x += dx[dir];
				y += dy[dir];
				hit = true;
				break;
			}
		}
	}
	cout << endl;

	return 0;
}