#include <iostream>
#include <string>


using namespace std;

bool wall[11][11];

class Cbot{
private:

public:
	int x, y;
	int direc;
	string log;

	Cbot();
	int Start();

};

Cbot::Cbot(){
	x = 2;
	y = 0;
	direc = 1;
	log = "";
}

int Cbot::Start(){

	int rx[4] = { 1, 0, -1, 0 };
	int ry[4] = { 0, 1, 0, -1 };
	int fx[4] = { 0, 1, 0, -1 };
	int fy[4] = { -1, 0, 1, 0 };
	int dx[4] = { 0, 2, 0, -2 };
	int dy[4] = { -2, 0, 2, 0 };
	char logd[4] = { 'U', 'R', 'D', 'L' };

	int cnt = 0;

	while (1){

		//????????§??????
		if (wall[y + ry[direc]][x + rx[direc]] == 1){
			//????????§??????
			log += logd[direc];
			if (wall[y + fy[direc]][x + fx[direc]] == 0){
				//??????
				x += dx[direc];
				y += dy[direc];
			}
			else{
				//?????????
				if (direc == 0)direc = 3;
				else direc--;
			}
		}
		else{
			//?????????+??????
			if (direc == 3)direc = 0;
			else direc++;
			x += dx[direc];
			y += dy[direc];
		}

		//??´????????????
		if (x == 0 && y == 2 && direc == 3) break;
		if (x == 0 && y == 0 && direc == 0) break;
		if (cnt++ > 100) return 0;
	}

	return 1;
}

int main(){

	int index = 1;
	char buf;
	Cbot bot;

	for (int i = 0; i < 11; i++){
		for (int j = 0; j < 11; j++){
			wall[i][j] = 0;
		}
	}

	//??????????????????
	while (1){
		for (int i = 0; i < 4; i++){
			cin >> buf;
			wall[index][(i + 1) * 2] = buf - '0';
		}
		index++;
		if (index == 10)break;

		for (int i = 0; i < 5; i++){
			cin >> buf;
			wall[index][i * 2 + 1] = buf - '0';
		}
		index++;
	}

	bot.Start();

	cout << bot.log << endl;

	return 0;
}