#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
#define int long long
int gd(int d, vector<int> w){
	if(w[(d+1)%4]==1) return (d+1)%4;
	else if(w[d]==1) return d;
	else if(w[(d+3)%4]==1) return (d+3)%4;
	else return (d+2)%4;
};
signed main(){
	char buf[256];
	vector<vector<vector<int>>> rms(5,vector<vector<int>>(5, vector<int>(4,0)));
	for(int i=0;i<9;i++){
		scanf("%s",buf);
		if(i%2==0){
			for(int j=0;j<4;j++){
				if(buf[j]=='1'){
					rms[i/2][j][0] = 1;
					rms[i/2][j+1][2] = 1;
				}
			}
		}else{
			for(int j=0;j<5;j++){
				if(buf[j]=='1'){
					rms[i/2][j][3] = 1;
					rms[i/2+1][j][1] = 1;
				}
			}
		}
	}
	int x=0,y=0,d=0;
	while(true){
		d = gd(d,rms[y][x]);
		if(d==0){cout<<"R"; x++;}
		else if(d==1){cout<<"U"; y--;}
		else if(d==2){cout<<"L"; x--;}
		else {cout<<"D"; y++;}
		if(x==0&&y==0) break;
	}
	cout << endl;
	return 0;
}