#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	vector<vector<int>> H(5,vector<int>(4)),V(4,vector<int>(5));
	REP(i,9){
		string S=in<string>();
		if(!(i%2)){
			REP(j,4) H[i/2][j] = S[j]-'0';
		}
		else{
			REP(j,5) V[i/2][j] = S[j]-'0';
		}
	}
	
	enum{R=0,D,L,U};
	int X=0,Y=0,dir=R;
	auto check = [&](){return (!X && !Y);};
	string S;
	while(true){
		if(dir==R){
			if(Y>0 && V[Y-1][X]){
				dir = U;
				Y--;
				S.push_back('U');
				if(check()) break;
			}
			else if(X<4 && H[Y][X]){
				X++;
				S.push_back('R');
			}
			else if(Y<4 && V[Y][X]){
				dir = D;
				Y++;
				S.push_back('D');
			}
			else{
				dir = L;
				X--;
				S.push_back('L');
				if(check()) break;
			}
		}
		else if(dir==D){
			if(X<4 && H[Y][X]){
				dir = R;
				X++;
				S.push_back('R');
			}
			else if(Y<4 && V[Y][X]){
				Y++;
				S.push_back('D');
			}
			else if(X>0 && H[Y][X-1]){
				dir = L;
				X--;
				S.push_back('L');
				if(check()) break;
			}
			else{
				dir = U;
				Y--;
				S.push_back('U');
				if(check()) break;
			}
		}
		else if(dir==L){
			if(Y<4 && V[Y][X]){
				dir = D;
				Y++;
				S.push_back('D');
			}
			else if(X>0 && H[Y][X-1]){
				X--;
				S.push_back('L');
				if(check()) break;
			}
			else if(Y>0 && V[Y-1][X]){
				dir = U;
				Y--;
				S.push_back('U');
				if(check()) break;
			}
			else{
				dir = R;
				X++;
				S.push_back('R');
			}
		}
		else{
			if(X>0 && H[Y][X-1]){
				dir = L;
				X--;
				S.push_back('L');
				if(check()) break;
			}
			else if(Y>0 && V[Y-1][X]){
				Y--;
				S.push_back('U');
				if(check()) break;
			}
			else if(X<4 && H[Y][X]){
				dir = R;
				X++;
				S.push_back('R');
			}
			else{
				dir = D;
				Y++;
				S.push_back('D');
			}
		}
	}
	
	out(S);
	return 0;
}
