#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[4][5];
	char inp;
	int yoko[5][4];
	int x,y;
	int now;

	for(int i=0;i<5;i++){
		for(int j=0;j<4;j++){
			inp=getchar();
			yoko[i][j]=(int)(inp-'0');
		}
		getchar();
		if(i!=4){
			for(int j=0;j<5;j++){
				inp=getchar();
				tate[i][j]=(int)(inp-'0');
			}
			getchar();
		}
	}

	now=R;
	x=0,y=0;
	while(1){
		if(now==R){
			now=D;
			if(y-1>=0&&y-1<4&&x>=0&&x<5){
				if(tate[y-1][x]==1) now=U;
			}
			if(y>=0&&y<5&&x>=0&&x<4){
				if(yoko[y][x]==1){
					x++;
					cout<<"R";
					now=R;
				}
			}
		}
		if(now==D){
			now=L;
			if(y>=0&&y<5&&x>=0&&x<4){
				if(yoko[y][x]==1) now=R;
			}
			if(y>=0&&y<4&&x>=0&&x<5){
				if(tate[y][x]==1){
					y++;
					cout<<"D";
					now=D;
				}
			}
		}
		if(now==L){
			now=U;
			if(y>=0&&y<4&&x>=0&&x<5){
				if(tate[y][x]==1) now=D;
			}
			if(y>=0&&y<5&&x-1>=0&&x-1<4){
				if(yoko[y][x-1]==1){
					x--;
					cout<<"L";
					now=L;
				}
			}
		}
		if(now==U){
			now=R;
			if(y>=0&&y<5&&x-1>=0&&x-1<4){
				if(yoko[y][x-1]==1) now=L;
			}
			if(y-1>=0&&y-1<4&&x>=0&&x<5){
				if(tate[y-1][x]==1){
					y--;
					cout<<"U";
					now=U;
				}
			}
		}
		if(x==0&&y==0) break;
	}
	cout<<endl;
	return 0;
}