#include <iostream>
#include <string>
#include <array>
#include <bitset>
#include <cstdint>

int main()
{
	enum { Left, Up, Right, Down };

	typedef std::array<std::bitset<4>, 5> Row;
	typedef std::array<Row, 5> Matrix;
	Matrix matrix;

	for (std::uint32_t i = 0; i < 5u; ++i) {
		std::string input;
		std::cin >> input;
		for (std::uint16_t j = 0; j < 4U; ++j) {
			if (input[j] == '1') {
				matrix[i][j].set(Right);
				matrix[i][j + 1].set(Left);
			}
		}

		if (i == 4U) {
			break;
		}

		std::cin >> input;
		for (std::uint16_t j = 0; j < 5U; ++j) {
			if (input[j] == '1') {
				matrix[i][j].set(Down);
				matrix[i + 1][j].set(Up);
			}
		}
	}

	std::uint16_t i = 0, j = 0;
	char direct = 'R';
	do {
		if (direct == 'R') {
			if (matrix[i][j][Up]) {
				direct = 'U';
				--i;
			}
			else if (matrix[i][j][Right]) {
				direct = 'R';
				++j;
			}
			else if (matrix[i][j][Down]) {
				direct = 'D';
				++i;
			}
		}
		else if (direct == 'D') {
			if (matrix[i][j][Right]) {
				direct = 'R';
				++j;
			}
			else if (matrix[i][j][Down]) {
				direct = 'D';
				++i;
			}
			else if (matrix[i][j][Left]) {
				direct = 'L';
				--j;
			}
		}
		else if (direct == 'L') {
			if (matrix[i][j][Down]) {
				direct = 'D';
				++i;
			}
			else if (matrix[i][j][Left]) {
				direct = 'L';
				--j;
			}
			else if (matrix[i][j][Up]) {
				direct = 'U';
				--i;
			}
		}
		else if (direct == 'U') {
			if (matrix[i][j][Left]) {
				direct = 'L';
				--j;
			}
			else if (matrix[i][j][Up]) {
				direct = 'U';
				--i;
			}
			else if (matrix[i][j][Right]) {
				direct = 'R';
				++j;
			}
		}
		std::cout << direct << std::flush;
	} while (not (i == 0 and j == 0));
	std::cout << std::endl;

	return 0;
}