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

using namespace std;

vector< vector<int> > map(11, vector<int>(7));
int direction = 0;   //R:0 L:1 U:2 D:3
int x = 2, y = 1;
char a[4], b[5];


void init(){
	for (int i = 1; i <= 9; i++)
	{
		if (i % 2)
		{
			cin >> a;
			for (int j = 0; j < 4; ++j)map[i][j + 1] = char(a[j]) - '0';
		}
		else 
		{
			cin >> b;
			for (int j = 0; j < 5; ++j)map[i][j + 1] = char(b[j]) - '0';
		}
	}
}

void Right()
{
	if (map[y - 1][x])direction = 2, y -= 2, cout << 'U';
	else if (map[y][x])direction = 0, x += 1, cout << 'R';
	else if (map[y + 1][x])direction = 3, y += 2, cout << 'D';
	else  direction = 1, x -= 1, cout << 'L';
}

void Left()
{
	if (map[y + 1][x])direction = 3, y += 2, cout << 'D';
	else if (map[y][x - 1])direction = 1, x -= 1, cout << 'L';
	else if (map[y - 1][x])direction = 2, y -= 2, cout << 'U';
	else direction = 0, x += 1, cout << 'R';
}

void Up()
{
	if (map[y][x - 1])direction = 1, x -= 1, cout << 'L';
	else if (map[y - 1][x])direction = 2, y -= 2, cout << 'U';
	else if (map[y][x])direction = 0, x += 1, cout << 'R';
	else direction = 3, y += 2, cout << 'D';
}

void Down()
{
	if (map[y][x])direction = 0, x += 1, cout << 'R';
	else if (map[y + 1][x])direction = 3, y += 2, cout << 'D';
	else if (map[y][x - 1])direction = 1, x -= 1, cout << 'L';
	else direction = 2, y -= 2, cout << 'U';
}


void solve()
{
	while (!(x == 1 && y == 1))
	{
		switch (direction)
		{
			case 0: Right(); break;
			case 1: Left(); break;
			case 2: Up(); break;
			case 3: Down(); break;
			default: return;
		}
	}
}

int main(){
	init();

	cout << 'R';
	solve();
	cout << endl;
	return(0);
}