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

bool h[100][100]; // setinel
bool v[100][100];


int main(){
	string str, ans = "";
	char dir = 'n';
	int mx = 1;
	int my = 1;

	int i, j, len;

	for (i = 0; i < 100; i++) {
		for (j = 0; j < 100; j++) {
			h[i][j] = v[i][j] = false;
		}
	}

	i = j = 1;
	while(cin >> str){
		if(i == 1) len = str.size();
		if(str.size() == len){
			for (int k = 0; k < str.size(); k++) {
				h[i][k+1] = str[k] == '1' ? true : false;
			}
			i++;
		}else{
			for (int k = 0; k < str.size(); k++) {
				v[j][k+1] = str[k] == '1' ? true : false;
			}
			j++;
		}
	}
	
	do{
		if (v[my-1][mx] && dir != 'D' && (dir=='R' || !h[my][mx-1])) {
			dir = 'U';
			my--;
		}else if (h[my][mx] && dir != 'L' && (dir=='D' || !v[my-1][mx])) {
			dir = 'R';
			mx++;
		}else if (v[my][mx] && dir != 'U' && (dir=='L' || !h[my][mx])) {
			dir = 'D';
			my++;
		}else if (h[my][mx-1] && dir != 'R' && (dir=='U' || !v[my][mx])) {
			dir = 'L';
			mx--;
		}
		ans += dir;
	}while(!(mx == 1 && my == 1));

	cout << ans << endl;

	return 0;
}