#include <iostream>
#include <vector>

using namespace std;

int can[40][40];
int inside[40][40];

// DLUR
int dx[] = {0,-1,0,1};
int dy[] = {1,0,-1,0};

string answer;

vector<int> v;
int dfs(int x,int y,int hand){
	if(x == 1 && y == 2 ) return 0;
	//cout << x << " " << y << endl;
	
	if( !can[y+dy[hand]][x+dx[hand]] ){
		//v.push_back(hand);
		y += dy[hand];
		x += dx[hand];
		hand = (hand+1)%4;
		
	}
	if( can[y+dy[(hand+3)%4]][x+dx[(hand+3)%4]] ){
		do{
			hand = (hand+1)%4;
		}while(!can[y+dy[hand]][x+dx[hand]]);
		v.push_back(hand);
	}
	v.push_back(hand);
	dfs(x+dx[(hand+3)%4],y+dy[(hand+3)%4],hand);
	
}
int main(){

	for(int i = 0 ; i < 9 ; i++){
		if( i % 2 ){
			for(int j = 0 ; j < 5 ; j++){
				char c;
				cin >> c;
				if( c == '1' ){
					can[1+i/2*3][1+3*j] = 1;
					can[1+i/2*3+1][1+3*j] = 1;
					can[1+i/2*3+2][1+3*j] = 1;
					can[1+i/2*3+3][1+3*j] = 1;
				}
			}
		}else{
			for(int j = 0 ; j < 4 ; j++){
				char c;
				cin >> c;
				if( c == '1' ){
					can[i/2*3+1][1+j*3+0] = 1; 
					can[i/2*3+1][1+j*3+1] = 1;
					can[i/2*3+1][1+j*3+2] = 1;  
					can[i/2*3+1][1+j*3+3] = 1; 
				}
			}
		}
	}
	dfs(1,0,0);
	v.push_back(-1);
	int idx = 0;
	for(int i = 1 ; i < v.size() ; i++){
		if( v[i] != v[i-1] ){
			int len = (i - idx);
			//cout << len << endl;
			cout << string((len+1)/3,"RDLU"[v[idx]]);
			idx = i;
		}
	}
	cout << endl;
	
}