#include <iostream>
#include <string>
#define N 2000
using namespace std;

bool h[N][N]; // setinel
bool v[N][N];
char dir = 'R';
int mx = 1;
int my = 1;

bool left(){
	if(h[my][mx-1]){
		mx--;
		dir = 'L';
		return true;
	}
	return false;
}

bool right(){
	if(h[my][mx]){
		mx++;
		dir = 'R';
		return true;
	}
	return false;
}

bool up(){
	if(v[my-1][mx]){
		my--;
		dir = 'U';
		return true;
	}
	return false;
}

bool down(){
	if(v[my][mx]){
		my++;
		dir = 'D';
		return true;
	}
	return false;
}

int main(){
	string str, ans = "";
	int i, j, len;

	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 (dir == 'L') {
			if(down()){
			}else if(left()){
			}else if(up()){
			}
		}else if (dir == 'R') {
			if(up()){
			}else if(right()){
			}else if(down()){
			}
		}else if (dir == 'U') {
			if(left()){
			}else if(up()){
			}else if(right()){
			}
		}else if (dir == 'D') {
			if(right()){
			}else if(down()){
			}else if(left()){
			}
		}
		ans += dir;
	}while(!(mx == 1 && my == 1));

	cout << ans << endl;

	return 0;
}