#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>

using namespace std;


int zu[20][20];

int dx[]={0,1,0,-1};
int dy[]={-1,0,1,0};//UP,RIGHT,DOWN,LEFT
char pr[]={'U','R','D','L'};

main(){
	
	for(int i=0;i<13;i++){
		zu[0][i]=1;
		zu[i][0]=1;
		zu[12][i]=1;
		zu[i][12]=1;
	}
	
	for(int i=0;i<9;i++){
		if(i&1){
			for(int j=0;j<5;j++){
				char c;
				cin>>c;
				if(c-'0'){
					zu[i+2][j*2+2]=1;
					zu[i+1][j*2+2]=1;
					zu[i+3][j*2+2]=1;
				}
			}
		}else{
			for(int j=0;j<4;j++){
				char c;
				cin>>c;
				if(c-'0'){
					zu[i+2][j*2+3]=1;
					zu[i+2][j*2+2]=1;
					zu[i+2][j*2+4]=1;
				}
			}
		}
	}
	
	int x=2,y=2,d=1;
	while(true){
		int td=(d+3)%4;
		for(int i=0;i<4;i++){
			if(zu[y+dy[td]][x+dx[td]])break;
			td=(td+1)%4;
		}
		d=td;
		cout<<pr[d];
		x+=2*dx[d];
		y+=2*dy[d];
		if(x==2 && y==2)break;
	}
	cout<<endl;
}