#include<cstdio>
#include<iostream>
#include<string>

#define R 1
#define D 2
#define L 3
#define U 4

using namespace std;

int main(void){

	int tate[6][7]={0};
	char inp;
	int yoko[7][6]={0};
	int x,y;
	int now;

	for(int i=1;i<6;i++){
		for(int j=1;j<5;j++){
			inp=getchar();
			yoko[i][j]=(int)(inp-'0');
		}
		getchar();
		if(i!=5){
			for(int j=1;j<6;j++){
				inp=getchar();
				tate[i][j]=(int)(inp-'0');
			}
			getchar();
		}
	}
	now=R;
	bool f=false;
	x=1,y=1;
	while(1){
		if(now==R){
			now=D;
			if(tate[y-1][x]==1&&f==false) now=U,f=true;
			else if(yoko[y][x]==1){
				x++;
				cout<<"R";
				now=R;
				f=false;
			}
		}
		if(now==D){
			now=L;
			if(yoko[y][x]==1&&f==false) now=R,f=true;
			else if(tate[y][x]==1){
				y++;
				cout<<"D";
				now=D;
				f=false;
			}
		}
		if(now==L){
			now=U;
			if(tate[y][x]==1&&f==false) now=D,f=true;
			else if(yoko[y][x-1]==1){
				x--;
				cout<<"L";
				now=L;
				f=false;
			}
		}
		if(now==U){
			now=R;
			if(yoko[y][x-1]==1&&f==false) now=L,f=true;
			else if(tate[y-1][x]==1){
				y--;
				cout<<"U";
				now=U;
				f=false;
			}
		}
		if(x==1&&y==1) break;
	}
	cout<<endl;
	return 0;
}