#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;



int main()
{
	bool points[5][5][4];
	for (int i = 0; i < 5; ++i)
		for (int j = 0; j < 5; ++j)
			for (int k = 0; k < 4; ++k)
				points[i][j][k] = false;

	for (int i = 0; i < 9; ++i)
	{
		int y = i/2;
		if (i%2 == 0)
		{
			for (int j = 0; j < 4; ++j)
			{
				int e;
				scanf("%1d", &e);
				if (e)
					points[y][j][1] = points[y][j+1][3] = true;
			}
		}
		else
		{
			for (int j = 0; j < 5; ++j)
			{
				int e;
				scanf("%1d", &e);
				if (e)
					points[y][j][2] = points[y+1][j][0] = true;
			}
		}
	}

	int x, y;
	x = 1;
	y = 0;
	int dir = 1;
	int dx[] = { 0, 1, 0, -1 };
	int dy[] = { -1, 0, 1, 0 };
	char* ds = "URDL";
	putchar(ds[dir]);
	while (!(x == 0 && y == 0))
	{
		if (points[y][x][(dir+3)%4])
			dir = (dir+3)%4;
		else if (points[y][x][dir])
			;
		else if (points[y][x][(dir+1)%4])
			dir = (dir+1)%4;
		else
			dir = (dir+2)%4;

		x += dx[dir];
		y += dy[dir];
		putchar(ds[dir]);
	}

	return 0;
}