#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;

bool flg = true;
int pos = 0;
char dir = 'R';
int bar[11][6] = {0};

void move(void)
{
	flg = false;
	switch(dir){
	case 'R':
		if	   (bar[pos/10  ][pos%10  ]) {pos-=20; dir='U'; cout<<dir;}
		else if(bar[pos/10+1][pos%10+1]) {pos+= 1; dir='R'; cout<<dir;}
		else if(bar[pos/10+2][pos%10  ]) {pos+=20; dir='D'; cout<<dir;}
		else							 {pos-= 1; dir='L'; cout<<dir;}
		break;
	case 'L':
		if	   (bar[pos/10  ][pos%10  ]) {pos-=20; dir='U'; cout<<dir;}
		else if(bar[pos/10+1][pos%10  ]) {pos-= 1; dir='L'; cout<<dir;}
		else if(bar[pos/10+2][pos%10  ]) {pos+=20; dir='D'; cout<<dir;}
		else							 {pos+= 1; dir='R'; cout<<dir;}
		break;
	case 'U':
		if	   (bar[pos/10+1][pos%10  ]) {pos-= 1; dir='L'; cout<<dir;}
		else if(bar[pos/10  ][pos%10  ]) {pos-=20; dir='U'; cout<<dir;}
		else if(bar[pos/10+1][pos%10+1]) {pos+= 1; dir='R'; cout<<dir;}
		else							 {pos+=20; dir='D'; cout<<dir;}
		break;
	case 'D':
		if	   (bar[pos/10+1][pos%10+1]) {pos+= 1; dir='R'; cout<<dir;}
		else if(bar[pos/10+2][pos%10  ]) {pos+=20; dir='D'; cout<<dir;}
		else if(bar[pos/10+1][pos%10  ]) {pos-= 1; dir='L'; cout<<dir;}
		else							 {pos-=20; dir='U'; cout<<dir;}
		break;
	}
}

int main(void)
{
	string str[10];

	for(int i=1; i<10; i++)
		cin >> str[i];

	for(int i=1; i<10; i++)
	{
		for(int j=0; j<5; j++)
		{
			if(i%2 == 1)
			{
				if(j!=0)
				{
					bar[i][j] = atoi(str[i].substr(j-1,1).c_str());
				}
			}
			else
			{
				bar[i][j] = atoi(str[i].substr(j,1).c_str());
			}
		}
	}
	
	while(pos!=0 || flg==true)
		move();

	cout << endl;

	return 0;
}