#include<iostream>
#include<string>

bool field[10][6];
int dir = 1;
int dx[] = { 0, 1, 0, -1 }, dy[] = { -1, 0, 1, 0 };
int x = 1, y = 0;
char s[5] = "URDL";

bool safe( int x, int y )
{
	return x >= 0 && x < 9 && y >= 0 && y < 9;
}

char g[9][9];

int main()
{
	for( int i = 0; i != 9; ++i )
	{
		std::string line;
		std::cin >> line;

		bool odd = i & 1;
		for( int j = !odd; j < 9; j += 2 )
		{
			g[i][j] = line[j/2] - '0' ? odd ? '|' : '_' : ' ';
			g[i][j+1] = '.';
		}

		if( !odd )
			g[i][0] = '.';
	}
	
	do
	{
		int fdir = ( 4 + dir - 1 ) % 4;
		int fx = x + dx[dir] + dx[fdir], fy = y + dy[dir] + dy[fdir];

		if( !safe( x, y ) || g[y][x] == ' ' )
		{
			x -= dx[dir], y -= dy[dir], dir = ( dir + 1 ) % 4;
			x += dx[dir], y += dy[dir];
		}
		else if( safe( fx, fy ) && ( g[fy][fx] == '_' || g[fy][fx] == '|' ) )
		{
			std::cout << s[dir];
			x += dx[dir], y += dy[dir], dir = ( 4 + dir - 1 ) % 4;
			x += dx[dir], y += dy[dir];
		}
		else
		{
			x += dx[dir] * 2, y += dy[dir] * 2;
			std::cout << s[dir];
		}

		if( x == 1 && y == 0 )
		{
			std::cout << s[dir];

			break;
		}
	}while( true );

	std::cout << std::endl;
	
	return 0;
}