#include <iostream>
#include <cstring>
using namespace std;

typedef struct{
	int flg[4];
}Point;

int main(void){
	int di[] = {-1,0,1,0};
	int dj[] = {0,1,0,-1};
	char ch[] = "URDL";
	Point p[5][5];
	memset(p,0,sizeof(p));

	for(int i=0;i<9;i++){
		char wall[8];
		cin>>wall;
		if(i % 2){
			for(int j=0;j<5;j++){
				p[i/2][j].flg[2] = p[i/2+1][j].flg[0] = wall[j] - '0';
			}
		}
		else{
			for(int j=0;j<4;j++){
				p[i/2][j].flg[1] = p[i/2][j+1].flg[3] = wall[j] - '0';
			}
		}
	}

	int pi=0, pj=1, d=1;
	cout<<"R";
	while(pi != 0 || pj != 0){
		int front = p[pi][pj].flg[d];
		int left = p[pi][pj].flg[(d+3)%4];

		if(left == 1 || left == 0 && front == 1){
			if(left == 1) d = (d+3)%4;
			cout<<ch[d];
			pi += di[d];
			pj += dj[d];
		}
		else{
			d = (d+1)%4;
		}
	}
	cout<<endl;

	return 0;
}