#include <bits/stdc++.h>
using namespace std;

struct P{
	int x,y;
	P(int x,int y) : x(x), y(y){}; 
	P(){}
};
bool operator < (const P &a,const P &b){
	if( a.x != b.x ) return a.x < b.x;
	return a.y < b.y;
}


string dd = "RDLU";

P g[5][5][4];

map<P,string> memo;
string dfs(P p,int d,string s,string rs){
	//cout << p.x << " " << p.y <<" " << d<< endl;
	if( memo.count(p) ){
		string r = memo[p];
		reverse(r.begin(),r.end());
		cout << s + r << endl;
		exit(0);
	}
	memo[p] = rs;

	for(int i = 0 ; i < 4 ; i++){
		if( g[p.y][p.x][(i+d)%4].x != -1){
			dfs(g[p.y][p.x][(i+d)%4],(i+d)%4,s+dd[(i+d)%4],rs+dd[(i+d+2)%4]);
			
		}
	}

}
int main(){
	for(int i = 0 ; i < 5 ; i++)
		for(int j = 0 ; j < 5 ; j++)
			for(int k = 0 ; k < 4 ; k++)
				g[i][j][k] = P(-1,-1);
	
	for(int i = 0 ; i < 9 ; i++){
		string s;
		cin >> s;
		//cout << s << endl;
		if( i % 2 ){
			int y = i / 2;
			for(int j = 0 ; j < 5 ; j++)
				if( s[j] == '1' ){
					//cout << j << " " << y+1 << "<" << endl;
					g[y][j][1] = P(j,y+1);
					g[y+1][j][3] = P(j,y);
				}			
		}else{
			int y = i / 2;
			for(int j = 0 ; j < 4 ; j++)
				if( s[j] == '1' ){
					g[y][j][0] = P(j+1,y);
					g[y][j+1][2] = P(j,y);
				}
		}
		
	}
	dfs(P(0,0),0,"","");
}