#include <iostream>
#include <string>
using namespace std;

string yoko[5];
string tate[4];
int x = 0;
int y = 0;
char d;

void left()
{
	x--;
	d = 'L';
	cout << 'L';
}
void right()
{
	x++;
	d = 'R';
	cout << 'R';
}
void up()
{
	y--;
	d = 'U';
	cout << 'U';
}
void down()
{
	y++;
	d = 'D';
	cout << 'D';
}

int main()
{
	for (int i = 0; i < 9; i++)
	{
		if (i % 2 == 0) cin >> yoko[i / 2];
		else cin >> tate[i / 2];
	}

	right();

	while (true)
	{
		if (d == 'R')
		{
			if (y != 0 && tate[y - 1][x] == '1')  up();
			else if (x != 4 && yoko[y][x] == '1') right();
			else if (y != 4 && tate[y][x] == '1') down();
			else								  left();
		}
		else if (d == 'L')
		{
			if (y != 4 && tate[y][x] == '1')		  down();
			else if (x != 0 && yoko[y][x - 1] == '1') left();
			else if (y != 0 && tate[y - 1][x] == '1') up();
			else									  right();
		}
		else if (d == 'U')
		{
			if (x != 0 && yoko[y][x - 1] == '1')	  left();
			else if (y != 0 && tate[y - 1][x] == '1') up();
			else if (x != 4 && yoko[y][x] == '1')	  right();
			else									  down();
		}
		else if (d == 'D')
		{
			if (x != 4 && yoko[y][x] == '1')		  right();
			else if (y != 4 && tate[y][x] == '1')	  down();
			else if (x != 0 && yoko[y][x - 1] == '1') left();
			else									  up();
		}

		if (x == 0 && y == 0) break;
	}
	cout << endl;

	return 0;
}