#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


class P{
	public:
	int a,b,c;
	P(){}
	P(int a,int b,int c):a(a),b(b),c(c){}
};

int main(){
	
	const int N = 20;
	const int B = 2;
	string m[2][N];
	
	P dp[4];
	dp[0]=P(0,0,0);
	dp[1]=P(1,-1,0);
	dp[2]=P(0,-1,0);
	dp[3]=P(1,-1,1);
	
	
	int dx[4]={1,0,-1,0};
	int dy[4]={0,1,0,-1};
	string ds="RDLU";
	
	rep(i,B){
		m[0][i]=m[1][i]="00000000000";
		m[0][i+9/2+B]=m[1][i+9/2+B]="00000000000";
	}
	rep(i,9){
		string s;
		cin>>s;
			
		if(i%2==0){
			m[0][i/2+B]="00"+s+"00"; 
		}
		else{
			m[1][i/2+B]="00"+s+"00";
		}
	}
	
	int x = B;
	int y = B;
	int dir = 0;
	string ans = "";
	while(1){
		if(x==B && y==B && dir==0 && ans.size()!=0)break;
		
		//printf("%d %d %d  [%s]%d\n",x,y,dir,ans.c_str(),ans.size());
		if(ans.size()>50)break;
		
		P right = dp[dir];
		P front = dp[(dir+3)%4];
		
		ans += ds[dir];
		
		if(m[front.a][y+front.b][x+front.c]=='1'){
			dir=(dir+3)%4;	
		}else	if(m[right.a][y+right.b+dy[dir]][x+right.c+dx[dir]]=='0'){
			
			P nr = dp[dir];
			while(m[nr.a][y+nr.b+dy[dir]][x+nr.c+dx[dir]]=='0'){
				x+=dx[dir];
				y+=dy[dir];
				dir=(dir+1)%4;
				nr=dp[dir];
			} 
			x+=dx[dir];
			y+=dy[dir];
		}else{
			x+=dx[dir];
			y+=dy[dir];
		}
	}
	
	cout<<ans<<endl;
}