#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a,T b){for(T i=a;i!=b;++i)cout<<*i<<" ";cout<<endl;}
template<class T> void chmin(T &t,T f){if(t>f)t=f;}
template<class T> void chmax(T &t,T f){if(t<f)t=f;}
int in(){int x;scanf("%d",&x);return x;}

int yoko[6][6],tate[6][6];

int state;
pint pos;


int main(){
	int i,j;
	for(i=0;i<4;i++){
		for(j=0;j<4;j++)yoko[i][j]=getchar()-'0';
		getchar();
		for(j=0;j<5;j++)tate[i][j]=getchar()-'0';
		getchar();
	}
	for(j=0;j<4;j++)yoko[4][j]=getchar()-'0';
	cout<<"R";
//cout<<endl;
	pos.first=1;
	pos.second=0;
	state=0;
/*	for(i=0;i<4;i++){
		for(j=0;j<4;j++)cout<<yoko[i][j];
		cout<<endl;
		for(j=0;j<5;j++)cout<<tate[i][j];
		cout<<endl;
	}
	for(j=0;j<4;j++)cout<<yoko[4][j];
	cout<<endl;
*/	
	
	while(pos.first!=0||pos.second!=0){
//cout<<pos.first<<" "<<pos.second<<endl;
		switch(state){
		case 0:
			if(pos.second!=0&&tate[pos.second-1][pos.first]==1){
				pos.second--;
				state=1;
			}else if(pos.first!=4&&yoko[pos.second][pos.first]==1){
				pos.first++;
				state=0;
			}else if(pos.second!=4&&tate[pos.second][pos.first]==1){
				pos.second++;
				state=3;
			}else{
				pos.first--;
				state=2;
			}
		break;
		case 1:
			if(pos.first!=0&&yoko[pos.second][pos.first-1]==1){
				pos.first--;
				state=2;	
			}else if(pos.second!=0&&tate[pos.second-1][pos.first]==1){
				pos.second--;
				state=1;
			}else if(pos.first!=4&&yoko[pos.second][pos.first]==1){
				pos.first++;
				state=0;
			}else{
				pos.second++;
				state=3;
			}
		break;
		case 2:
			if(pos.second!=4&&tate[pos.second][pos.first]==1){
				pos.second++;
				state=3;
			}else if(pos.first!=0&&yoko[pos.second][pos.first-1]==1){
				pos.first--;
				state=2;
			}else if(pos.second!=0&&tate[pos.second-1][pos.first]==1){
				pos.second--;
				state=1;
			}else{
				pos.first++;
				state=0;
			}
		break;
		case 3:
			if(pos.first!=4&&yoko[pos.second][pos.first]==1){
				pos.first++;
				state=0;
			}else if(pos.second!=4&&tate[pos.second][pos.first]==1){
				pos.second++;
				state=3;
			}else if(pos.first!=0&&yoko[pos.second][pos.first-1]==1){
				pos.first--;
				state=2;
			}else{
				pos.second--;
				state=1;
			}
		break;
		default: cout<<"hoge"<<endl;
		break;
		}
		if(state==0)cout<<"R";
		if(state==1)cout<<"U";
		if(state==2)cout<<"L";
		if(state==3)cout<<"D";
	}
	cout<<endl;


	return 0;
}