#include <string>
#include <algorithm>
#include <vector>
#include <iostream>
using namespace std;
typedef pair<int,int> P;
#define pb push_back
#define fi first
#define sec second
int angle=0;
int edge[6][6][4]={0};
vector<int> ans;
P now;
P nextpoint(P t,int angl)
{
	P f;
	f.fi=t.fi;
	f.sec=t.sec;
	if(angl==0)
	{
		f.sec++;
	}
	if(angl==1)
	{
		f.fi++;
	}
	if(angl==2)
	{
		f.sec--;
	}
	if(angl==3)
	{
		f.fi--;
	}
	return f;
}
void output(int n)
{
	if(n==0)
	{
		cout << 'R';
	}
	else if(n==1)
	{
		cout << 'D';
	}
	else if(n==2)
	{
		cout << 'L';
	}
	else
	{
		cout << 'U';
	}
	return ;
}
void step()
{
	int tmp;
	int ans;
	tmp=(angle+4-1)%4;
	while(1)
	{
		if(edge[now.fi][now.sec][tmp])break;
		tmp=(tmp+1)%4;
	}
	angle=tmp;
	P r;
	r.fi=nextpoint(now,angle).fi;
	r.sec=nextpoint(now,angle).sec;
	now.fi=r.fi;
	now.sec=r.sec;
	return ;
}
int main()
{
	now.fi=1;now.sec=1;
	for(int i=1;i<=9;i++)
	{
		if(i%2==1)
		{
			string s;
			cin >> s;
			for(int j=0;j<4;j++)
			{
				edge[(i+1)/2][j+1][0]=s[j]-'0';
				edge[(i+1)/2][j+2][2]=s[j]-'0';
			}
		}
		else
		{
			string s;
			cin >> s;
			for(int j=0;j<5;j++)
			{
				edge[i/2][j+1][1]=s[j]-'0';
				edge[i/2+1][j+1][3]=s[j]-'0';
			}
		}
	}
	while(1)
	{
		step();
		if(now.fi==1&&now.sec==1)
		{
			break;
		}
		ans.pb(angle);
	}
	for(int i=0;i<ans.size();i++)
	{
		output(ans[i]);
	}
	cout << endl;
	return 0;
}