#include <iostream>
#include <sstream>

using namespace std;

char perm_angle[4] = {'R','U','L','D'};
int grid[5][5][4] = {0};

void move(int,int,char);
char det_angle(int,int,char);

int main(){
	int flag;
	for(int i=0;i<9;i++){
		if(i%2 == 0){
			for(int j=0;j<4;j++){
				fscanf(stdin,"%1d",&flag);
				//cout << flag;
				if(flag == 1){
					//cout << "+";
					grid[i/2][j][0]  = 1; //R
					grid[i/2][j+1][2]= 1; //L
				}
			}
		}
		else{
			for(int j=0;j<5;j++){
				fscanf(stdin,"%1d",&flag); 
				//cout << flag;
				if(flag == 1){
					//cout << "-";
					grid[i/2][j][3]  = 1; //D
					grid[i/2+1][j][1]= 1; //U
				}
			}
			
		}
		//cout << endl;
	}
	/*for(int i=0;i<5;i++){
		for(int j=0;j<5;j++){
			cout << 100*i+j;
			for(int k=0;k<4;k++){
				cout <<  " "  << grid[i][j][k];
			}
			cout << endl;
		}
	}*/
//	if(fscanf(stdin,"%1d",&map[i][j]) != EOF){

	//int x = 0, y = 0;
	//char angle = 'R';
	/*do{
		move(x,y,det_angle(x,y,angle))
	}while(x == 0 && y == 0);*/
	cout << 'R';
	move(0,1,'R');
}

void move(int x,int y,char angle){
	if(x == 0 && y== 0)
		exit(1);
	
	cout << angle;
	
	if(angle == 'R'){
		++y;
	}
	else if(angle == 'U'){
		--x;
	}
	else if(angle == 'L'){
		--y;
	}
	else if(angle == 'D'){
		++x;
	}
	//cout << "test" << x <<" " << y;
	move(x,y,det_angle(x,y,angle));
	//cout << angle << endl; 
}

char det_angle(int x,int y,char angle){
	
	//cout << x << y << " " << angle << endl;
	int start;
	if(angle == 'R'){
		start = 5;
	}
	else if(angle == 'U'){
		start = 6;
	}
	else if(angle == 'L'){
		start = 7;	
	}
	else if(angle == 'D'){
		start = 4;
	}
	//cout << start << endl;
	for(int i = start;start - i < 4 ;--i){
		if(grid[x][y][i%4] == 1){
			//cout << "kettei" << i <<endl ;
			return perm_angle[i%4];
		}
	}
	return 'Z';
}