#include <iostream>
using namespace std;
//R:0 L:1 U:2 D:3


int map[11][7], type, x=2, y=1;
char a[4], b[5];


void init(){
	for(int i=1; i<=9; i++){
		if(i%2){
			cin>>a;
			for(int n=0; n<4; n++)map[i][n+1] = char(a[n])-'0';
		}
		else {
			cin>>b;
			for(int m=0; m<5; m++)map[i][m+1] = char(b[m])-'0';
		}			
	}
}


void Right(){
	if(map[y-1][x])type=2, y-=2, cout<<'U';
	else if(map[y][x])type=0, x+=1, cout<<'R';
	else if(map[y+1][x])type=3, y+=2, cout<<'D';
	else  type=1, x-=1, cout<<'L';
}
void Left(){
	if(map[y+1][x])type=3, y+=2, cout<<'D';
	else if(map[y][x-1])type=1, x-=1, cout<<'L';
	else if(map[y-1][x])type=2, y-=2, cout<<'U';
	else type=0, x+=1, cout<<'R';
}
void Up(){
	if(map[y][x-1])type=1, x-=1, cout<<'L';
	else if(map[y-1][x])type=2, y-=2, cout<<'U';
	else if(map[y][x])type=0, x+=1, cout<<'R';
	else type=3, y+=2, cout<<'D';
}
void Down(){
	if(map[y][x])type=0, x+=1, cout<<'R';
	else if(map[y+1][x])type=3, y+=2, cout<<'D';
	else if(map[y][x-1])type=1, x-=1, cout<<'L';
	else type=2, y-=2, cout<<'U';
}


void solve(){
	while(!(x==1&&y==1)){
		switch(type){
			case 0: Right(); break;
			case 1: Left(); break;
			case 2: Up(); break;
			case 3: Down(); break;
			default: return;
		}
	}
}
 
int main(){
	init();
	
	cout<<'R';
	solve();
	cout<<"\n";	
    return 0;  
}  