#include <iostream>
#include <vector>

using namespace std;

int can[10][10][4];

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

string answer;
int dfs(int y,int x,int py,int px,int d){

	if( py != -1 ){
		if( y == py ){
			if( x - px > 0 ) answer += "R"; else answer += "L";
		}else{
			if( y - py > 0 ) answer += "D"; else answer += "U";
		}
	}
	if( py != -1 && x == 0 && y == 0 ) return 0;
	//cout << y << " " << x << " " << can[y][x][0] << " " << can[y][x][1] << " " << can[y][x][2] << " " << can[y][x][3] << " " << endl;
	
	for(int i = 0 ; i < 4 ; i++){
		if( can[y][x][(i+d)%4]  ){
			int tx = x + dx[(i+d)%4];
			int ty = y + dy[(i+d)%4];
			if( tx == px && ty == py ) continue;
			can[y][x][(i+d)%4] = 0;
			dfs(ty,tx,y,x,(i+d)%4);
			return 0;
		}
	}
	for(int i = 0 ; i < 4 ; i++){
		if( can[y][x][(i+d)%4]  ){
			can[y][x][(i+d)%4] = 0;
			int tx = x + dx[(i+d)%4];
			int ty = y + dy[(i+d)%4];
			//if( tx == px && ty == py ) continue;
			dfs(ty,tx,y,x,(i+d)%4);
			return 0;
		}
	}
}// RDLU
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[i/2][j][1] = 1;
					can[i/2+1][j][3] = 1;
				}
			}
		}else{
			for(int j = 0 ; j < 4 ; j++){
				char c;
				cin >> c;
				if( c == '1' ){
					can[i/2][j][0] = 1; 
					can[i/2][j+1][2] = 1;
				}
			}
		}
	}
	dfs(0,0,-1,-1,0);
	cout << answer << endl;
	char c;
	if( (cin >> c) ) while(1){}
}