#include<iostream>
#include<string>
#include<sstream>
enum direction
{
	L, R, U, D
};
int main()
{
	int wall[9][5];
	for (int i = 0; i < 9; i++)
	{
		std::string foo;
		std::cin >> foo;
		std::stringstream bar(foo);
		for (int j = 0;; j++)
		{
			char baz;
			bar >> baz;
			wall[i][j] = static_cast<int>(baz - '0');
			if (i % 2 == 0 && j == 3 || j == 4)
			{
				break;
			}
		}
	}
	direction dir = R;
	int crd[2] = { 0,0 };
	while (true)
	{
		switch (dir)
		{
		case L:
			if (crd[1] != 8 && wall[crd[1] + 1][crd[0]] == 1)
			{
				crd[1]++;
				std::cout << 'D';
				dir = D;
			}
			else if (crd[0] == 0 || wall[crd[1]][crd[0] - 1] == 0)
			{
				crd[1]--;
				std::cout << 'U';
				dir = U;
			}
			else
			{
				crd[0]--;
				std::cout << 'L';
			}
			break;
		case R:
			if (crd[1] != 0 && wall[crd[1] - 1][crd[0] + 1] == 1)
			{
				crd[0]++;
				crd[1]--;
				std::cout << 'U';
				dir = U;
			}
			else if (crd[0] == 3 || wall[crd[1]][crd[0] + 1] == 0)
			{
				crd[0]++;
				crd[1]++;
				std::cout << 'D';
				dir = D;
			}
			else
			{
				crd[0]++;
				std::cout << 'R';
			}
			break;
		case U:
			if (crd[0] != 0 && wall[crd[1] - 1][crd[0] - 1] == 1)
			{
				crd[0]--;
				crd[1]--;
				std::cout << 'L';
				dir = L;
			}
			else if (crd[1] == 1 || wall[crd[1] - 2][crd[0]] == 0)
			{
				crd[1]--;
				std::cout << 'R';
				dir = R;
			}
			else
			{
				crd[1] -= 2;
				std::cout << 'U';
			}
			break;
		case D:
			if (crd[0] != 4 && wall[crd[1] + 1][crd[0]] == 1)
			{
				crd[1]++;
				std::cout << 'R';
				dir = R;
			}
			else if (crd[1] == 7 || wall[crd[1] + 2][crd[0]] == 0)
			{
				crd[0]--;
				crd[1]++;
				std::cout << 'L';
				dir = L;
			}
			else
			{
				crd[1] += 2;
				std::cout << 'D';
			}
			break;
		}
		if (crd[0] == 0 && crd[1] == 0)
		{
			std::cout << std::endl;
			break;
		}
	}
	return 0;
}
