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

int map[11][7], type, x = 2, y = 1;

void right(void)
{
	if (map[y-1][x]){ type = 2; y -= 2; cout << "U"; }
	else if (map[y][x]){ type = 0; x += 1; cout << "R"; }
	else if (map[y+1][x]){ type = 3; y += 2; cout << "D"; }
	else { type = 1; x -= 1; cout << "L"; }
	return;
}

void left(void)
{
	if (map[y+1][x]){ type = 3; y += 2; cout << "D"; }
	else if (map[y][x-1]){ type = 1; x -= 1; cout << "L"; }
	else if (map[y-1][x]){ type = 2; y -= 2; cout << "U"; }
	else { type = 0; x += 1; cout << "R"; }
	return;
}

void up(void)
{
	if (map[y][x-1]){ type = 1; x -= 1; cout << "L"; }
	else if (map[y-1][x]){ type = 2; y -= 2; cout << "U"; }
	else if (map[y][x]){ type = 0; x += 1; cout << "R"; }
	else { type = 3; y += 2; cout << "D"; }
	return;
}

void down(void)
{
	if (map[y][x]){ type = 0; x += 1; cout << "R"; }
	else if (map[y+1][x]){ type = 3; y += 2; cout << "D"; }
	else if (map[y][x-1]){ type = 1; x -= 1; cout << "L"; }
	else { type = 2; y -= 2; cout << "U"; }
	return;
}

int main(void)
{
	string a, b;
	for (int i = 1; i <= 9; i++){
		if (i % 2 == 1){
			cin >> a;
			for (int j = 0; j < 4; j++){
				map[i][j+1] = a[j] - '0';
			}
		}
		else {
			cin >> b;
			for (int j = 0; j < 5; j++){
				map[i][j+1] = b[j] - '0';
			}
		}
	}
	
	while (!(x == 1 && y == 1)){
		switch(type){
			case 0:
				right();
				break;
			case 1:
				left();
				break;
			case 2:
				up();
				break;
			case 3:
				down();
				break;
			default:
				puts("");
				return 0;
		}
	}
	
	return 0;
}