#include <iostream>
#include <string>
#include <vector>

const int horz_node_count = 5;
const int vert_node_count = 5;
const int direction_count = 4;	// [0]:left, [1]:up, [2]:right [3]:down
enum { left, up, right, down };

int index(int x, int y, int direction)
{
	return (y * horz_node_count + x) * direction_count + direction;
}

void read_data(int* walls)
{
	std::vector<std::string> input;
	for (int i = 0; i < vert_node_count * 2 - 1; ++i) {
		std::string line;
		if (std::getline(std::cin, line)) {
			input.push_back(line);
		}
	}

	std::fill_n(walls, horz_node_count * vert_node_count * direction_count, 0);

	for (int y = 0; y < vert_node_count; ++y) {
		for (int x = 0; x < horz_node_count - 1; ++x) {
			if (input[y*2][x] == '1') {
				walls[index(x,y,right)] = 1;
				walls[index(x+1,y,left)] = 1;
			}
		}
	}
	for (int y = 0; y < vert_node_count - 1; ++y) {
		for (int x = 0; x < horz_node_count; ++x) {
			if (input[y*2+1][x] == '1') {
				walls[index(x,y,down)] = 1;
				walls[index(x,y+1,up)] = 1;
			}
		}
	}
}

bool wall_exists(const int* walls, int x, int y, int direction)
{
	return (0 <= x && x < horz_node_count)
		&& (0 <= y && y < vert_node_count)
		&& (walls[index(x,y,direction)] != 0);
}

int main()
{
	int walls[horz_node_count * vert_node_count * direction_count] = {};
	read_data(walls);

	int x = 0, y = 0, direction = right;
	do {
		// determine the next direction
		direction = (direction + direction_count - 1) % direction_count;
		for (int i = 0; i < 4; ++i) {
			if (wall_exists(walls, x, y, direction)) {
				break;
			}
			direction = (direction + 1) % direction_count;
		}
		// step forward
		switch (direction) {
			case left:
				--x;
				std::cout << 'L';
				break;
			case up:
				--y;
				std::cout << 'U';
				break;
			case right:
				++x;
				std::cout << 'R';
				break;
			case down:
				++y;
				std::cout << 'D';
				break;
		}
	} while (x > 0 || y > 0);

	std::cout << std::endl;

	return 0;
}