#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
char walls[5][5][2];

int main()
{
	int x=0,y=0,flag=1;
	string tmp;
	for(int i = 0; i < 9; ++i)
	{
		flag=(flag+1)%2;
		cin>>tmp;
		for(int j = 0; j < 5; ++j)
		{
			if(!flag&&j==4) walls[i/2][4][flag]='0';
			else walls[i/2][j][flag]=tmp[j];
			//cin>>walls[i/2][j][flag];
		}
	}

	/*cout<<"debug"<<endl;	
	for(int i = 0; i < 5; ++i)
	{
		for(int j = 0; j < 5; ++j)
		{
			cout<<" "<<walls[i][j][0];
		}
		cout<<endl;
	}
	cout<<endl;
	for(int i = 0; i < 5; ++i)
	{
		for(int j = 0; j < 5; ++j)
		{
			cout<<" "<<walls[i][j][1];
		}
		cout<<endl;
	}*/
	//cout<<"end"<<endl;

	int dir=0;
	bool change=false;
	do {
		if(dir==0)
		{
			if(!change&&0<=y-1&&walls[y-1][x][1]=='1') 
			{
				dir=3;
				change=true;
			}
			else
			{
				if(x==4||walls[y][x][0]=='0')
				{
					dir=1;
					change=true;
				}
				else
				{
					++x;
					cout<<"R";
					change=false;
				}
			}
		}
		else if(dir==1)
		{
			if(!change&&x<4&&walls[y][x][0]=='1')
			{
				dir=0;
				change=true;
			}
			else
			{
				if(y==4||walls[y][x][1]=='0')
				{
					dir=2;
					change=true;
				}
				else
				{
					++y;
					cout<<"D";
					change=false;
				}
			}
		}
		else if(dir==2)
		{
			if(!change&&walls[y][x][1]=='1')
			{
				dir=1;
				change=true;
			}
			else
			{
				if(x==0||walls[y][x-1][0]=='0')
				{
					dir=3;
					change=true;
				}
				else
				{
					--x;
					cout<<"L";
					change=false;
				}
			}
		}
		else if(dir==3)
		{
			if(!change&&0<=x-1&&walls[y][x-1][0]=='1')
			{
				dir=2;
				change=true;
			}
			else
			{
				if(y==0||walls[y-1][x][1]=='0')
				{
					dir=0;
					change=true;
				}
				else
				{
					--y;
					cout<<"U";
					change=false;
				}
			}
		}
		//cout<<",x="<<x<<",y="<<y<<",dir="<<dir<<endl;
	} while(change||x!=0||y!=0);
	cout<<endl;
  return 0;
}