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


int main(){
	string str, ans = "";
	char h[7][6]= {0}; // setinel
	char v[6][7] = {0};
	char dir = 'n';
	int mx = 1;
	int my = 1;

	int i = 1;
	int j = 1;

	while(cin >> str){
		if(str.size() == 4){
			h[i][1] = str[0] - '0';
			h[i][2] = str[1] - '0';
			h[i][3] = str[2] - '0';
			h[i][4] = str[3] - '0';
			i++;
		}else if(str.size() == 5){
			v[j][1] = str[0] - '0';
			v[j][2] = str[1] - '0';
			v[j][3] = str[2] - '0';
			v[j][4] = str[3] - '0';
			v[j][5] = str[4] - '0';
			j++;
		}
	}
	
	do{
		if (v[my-1][mx] == 1 && dir != 'D' && (dir=='R' || h[my][mx-1] == 0)) {
			dir = 'U';
			my--;
		}else if (h[my][mx] == 1 && dir != 'L' && (dir=='D' || v[my-1][mx] == 0)) {
			dir = 'R';
			mx++;
		}else if (v[my][mx] == 1 && dir != 'U' && (dir=='L' || h[my][mx] == 0)) {
			dir = 'D';
			my++;
		}else if (h[my][mx-1] == 1 && dir != 'R' && (dir=='U' || v[my][mx] == 0)) {
			dir = 'L';
			mx--;
		}
		ans += dir;
	}while(!(mx == 1 && my == 1));

	cout << ans << endl;

	return 0;
}