#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

void input(bool grid[][9])
{
	rep(i,9){
		string s;
		cin>>s;
		if(i%2==0)
			rep(j,4)
				grid[i][j*2+1]=s[j]-'0';
		else
			rep(j,5)
				grid[i][j*2]=s[j]-'0';
	}
}

enum dir{
	UP,RIGHT,DOWN,LEFT
};
const int di[]={-1,0,1,0};
const int dj[]={0,1,0,-1};
const char output[]="URDL";

bool in_range(int i,int j)
{
	return 0<=i && i<9 && 0<=j && j<9;
}

int main()
{
	bool grid[9][9]={{0}};
	input(grid);
	//rep(i,9){
	//	rep(j,9)
	//		cout<<grid[i][j]<<" ";
	//	cout<<endl;
	//}
	
	int i=0,j=0;
	dir prev=RIGHT;
	for(;;){
		//printf("# (%d,%d) prev:%c\n",i,j,output[prev]);
		
		dir next[4];
		if(prev==UP){
			next[0]=LEFT;next[1]=UP;next[2]=RIGHT;next[3]=DOWN;
		}
		else if(prev==RIGHT){
			next[0]=UP;next[1]=RIGHT;next[2]=DOWN;next[3]=LEFT;
		}
		else if(prev==DOWN){
			next[0]=RIGHT;next[1]=DOWN;next[2]=LEFT;next[3]=UP;
		}
		else if(prev==LEFT){
			next[0]=DOWN;next[1]=LEFT;next[2]=UP;next[3]=RIGHT;
		}
		int k;
		for(k=0;k<3;k++){
			if(in_range(i+di[next[k]],j+dj[next[k]]) && grid[i+di[next[k]]][j+dj[next[k]]])
				break;
		}
		
		//printf("%d(%c)\n",k,output[next[k]]);
		cout<<output[next[k]];
		
		i+=di[next[k]]*2;
		j+=dj[next[k]]*2;
		prev=next[k];
		
		if(i==0 && j==0)
			break;
	}
	cout<<endl;
	
	return 0;
}