#include <cstdio>
using namespace std;

int main(){
	char yoko[7][6];//5 * 4
	char tate[6][7];//4 * 5
	int x, y;//position
	char dir;//next direction
	
	for(int i = 0; i < 4; i++){
		scanf("%s", yoko[i]);
		scanf("%s", tate[i]);
	}
	scanf("%s", yoko[4]);
	
	x = 0; y = 0; dir = 'R';
	while(true){
		printf("%c", dir);
		switch (dir){
			case 82://right
				x++;
				if(y > 0 && tate[y - 1][x] == '1') dir = 'U';
				else if(yoko[y][x] == '1') dir = 'R';
				else if(tate[y][x] == '1') dir = 'D';
				else dir = 'L';
				break;
			case 68://down
				y++;
				if(yoko[y][x] == '1') dir = 'R';
				else if(tate[y][x] == '1') dir = 'D';
				else if(x > 0 && yoko[y][x - 1] == '1') dir = 'L';
				else dir = 'U';
				break;
			case 76://left
				x--;
				if(tate[y][x] == '1') dir = 'D';
				else if(x > 0 && yoko[y][x - 1] == '1') dir = 'L';
				else if(y > 0 && tate[y - 1][x] == '1') dir = 'U';
				else dir = 'R';
				break;
			case 85://up
				y--;
				if(x > 0 && yoko[y][x - 1] == '1') dir = 'L';
				else if(y > 0 && tate[y - 1][x] == '1') dir = 'U';
				else if(yoko[y][x] == '1') dir = 'R';
				else dir = 'D';
				break;
			default :
				break;
		}
		
		if(x == 0 && y == 0) break;
	}
	printf("\n");
	
	return 0;
}