#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

string wall_01[5];
string wall_02[4];

char wall_1(int x, int y){
	if(x <= -1 || y <= -1 || x >= 4 || y >= 5){
		return '0';
	}
	return wall_01[y][x];
}

char wall_2(int x, int y){
	if(x <= -1 || y <= -1 || x >= 5 || y >= 4){
		return '0';
	}
	return wall_02[y][x];
}

int main(){
	
	for(int i = 0; i < 9; i++){
		if(i % 2 == 0){
			cin >> wall_01[i / 2];
		}else{
			cin >> wall_02[i / 2];
		}
	}
	
	int pos_x = 0;
	int pos_y = 0;
	
	char dir_list[4] = {'R', 'D', 'L', 'U'};
	
	char dir = 'R';
	
	while(true){
		
		//cout << pos_x << pos_y << dir << endl;
		
		if(dir == 'R'){
			if(wall_2(pos_x, pos_y - 1) == '1'){
				cout << "U";
				pos_y--;
				dir = 'U';
			}else if(wall_1(pos_x, pos_y) == '1'){
				cout << "R";
				pos_x++;
			}else if(wall_2(pos_x, pos_y) == '1'){
				dir = 'D';
			}else{
				dir = 'L';
			}
		}else if(dir == 'D'){
			if(wall_1(pos_x, pos_y) == '1'){
				cout << "R";
				pos_x++;
				dir = 'R';
			}else if(wall_2(pos_x, pos_y) == '1'){
				cout << "D";
				pos_y++;
			}else if(wall_1(pos_x - 1, pos_y) == '1'){
				dir = 'L';
			}else{
				dir = 'U';
			}
		}else if(dir == 'L'){
			if(wall_2(pos_x, pos_y) == '1'){
				cout << "D";
				pos_y++;
				dir = 'D';
			}else if(wall_1(pos_x - 1, pos_y) == '1'){
				cout << "L";
				pos_x--;
			}else if(wall_2(pos_x, pos_y - 1) == '1'){
				dir = 'U';
			}else{
				dir = 'R';
			}
		}else if(dir == 'U'){
			if(wall_1(pos_x - 1, pos_y) == '1'){
				cout << "L";
				pos_x--;
				dir = 'L';
			}else if(wall_2(pos_x, pos_y - 1) == '1'){
				cout << "U";
				pos_y--;
			}else if(wall_1(pos_x, pos_y) == '1'){
				dir = 'R';
			}else{
				dir = 'D';
			}
		}
		
		if(pos_x == 0 && pos_y == 0){
			cout << endl;
			break;
		}
	}
	
	return 0;
}