#include <iostream>
#include <string>
using namespace std;
int main() {
	string in[9];
	int x = 0, y = 0, d = 0;
	//d..direction  0→、1↓、2←、3↑
	for (int i = 0; i < 9; i++)
		cin >> in[i];
	do {
		if (d == 0) {
			if (y > 0) {
				if (in[2 * y - 1][x] == '1') {
					cout << "U";
					d = 3;
					y--;
					continue;
				}
			}
			if (x < in[0].size()) {
				if (in[2 * y][x] == '1') {
					cout << "R";
					x++;
					continue;
				}
			}
			if (y < 4) {
				if (in[2 * y + 1][x] == '1') {
					cout << "D";
					d = 1;
					y++;
					continue;
				}
			}
			cout << "L";
			x--;
			d = 2;
			continue;
		}
		if (d == 1) {
			if (x < in[0].size()) {
				if (in[2 * y][x] == '1') {
					cout << "R";
					d = 0;
					x++;
					continue;
				}
			}
			if (y < 4) {
				if (in[2 * y + 1][x] == '1') {
					cout << "D";
					y++;
					continue;
				}
			}
			if (x > 0) {
				if (in[2 * y][x - 1] == '1') {
					cout << "L";
					d = 2;
					x--;
					continue;
				}
			}
			cout << "U";
			d = 3;
			y--;
			continue;
		}
		if (d == 2) {
			if (y < 4) {
				if (in[2 * y + 1][x] == '1') {
					cout << "D";
					d = 1;
					y++;
					continue;
				}
			}
			if (x > 0) {
				if (in[2 * y][x - 1] == '1') {
					cout << "L";
					x--;
					continue;
				}
			}
			if (y > 0) {
				if (in[2 * y - 1][x] == '1') {
					cout << "U";
					d = 3;
					y--;
					continue;
				}
			}
			cout << "R";
			d = 0;
			x++;
			continue;
		}
		if (d == 3) {
			if (x > 0) {
				if (in[2 * y][x - 1] == '1') {
					cout << "L";
					d = 2;
					x--;
					continue;
				}
			}
			if (y > 0) {
				if (in[2 * y - 1][x] == '1') {
					cout << "U";
					y--;
					continue;
				}
			}
			if (x < in[0].size()) {
				if (in[2 * y][x] == '1') {
					cout << "R";
					d = 0;
					x++;
					continue;
				}
			}
			cout << "D";
			d = 1;
			y++;
			continue;
		}
	}while (x != 0 || y != 0);
	cout << endl;
	return 0;
}
