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

int i, j, a[6][6] = {}, b[6][5] = {};
string output = "";

int right(), left(), up(), down();

int right(){
	output += "R";
	if(b[i-1][j] == 1){
		i--;
		up();
	}
	else if(a[i][j+1] == 1){
		j++;
		right();
	}
	else if (a[i][j + 1] == 2) {  }
	else {
		down();
	}
	return 0;
}

int left(){
	output += "L";
	if (b[i][j-1] == 1) {
		j--;
		down();
	}
	else if (a[i][j-1] == 1) {
		j--;
		left();
	}
	else if (a[i][j - 1] == 2) { output += "L"; }
	else {
		i--;
		j--;
		up();
	}
	return 0;
}

int up(){
	output += "U";
	if (a[i][j] == 1) {
		left();
	}
	else if (a[i][j] == 2) { output += "L"; }
	else if (b[i-1][j] == 1) {
		i--;
		up();
	}
	else if (a[i][j + 1] == 2) {  }
	else {
		j++;
		right();
	}
	return 0;
}

int down(){
	output += "D";
	if (a[i+1][j+1] == 1) {
		i++;
		j++;
		right();
	}
	else if (a[i + 1][j + 1] == 2) {  }
	else if (b[i + 1][j] == 1) {
		i++;
		down();
	}
	else if (a[i + 1][j] == 2) { output += "L"; }
	else {
		i++;
		left();
	}
	return 0;
}

int main(){
	string input, k;
	for(i = 1; i<10;i++){
		getline(cin, input);
		if (input.size() != 4) {
			for(int j= 0;j<5;j++){
				k = input[j];
				b[i / 2][j] = stoi(k);
			}
		}
		else{
			for(int j = 1;j<5;j++){
				k = input[j-1];
				a[(i + 1)/ 2][j] = stoi(k);
			}
		}

	}

	a[1][1] = 2;
	i = 1;
	j = 1;
	right();
	cout << output << endl;
	return 0;
}