#define	_USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cctype>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
#include <complex>
#include <utility>
#include <numeric>
#include <bitset>
using namespace std;
const int INF=1<<30;

int d[11][7];
int x=2,y=1;
int k=0;

typedef pair<int,int> P;


void R(){
	if(d[y-1][x]) {
	k=2; 
	y-=2; 
	cout<<"U";
	}
	else if(d[y][x]) {
	k=0; 
	x++; 
	cout<<"R";
	}
	else if(d[y+1][x]){
		k=3;
		y+=2;
		cout<<"D";
	}
	else{
		k=1;
		x--;
		cout<<"L";
	}

}
void L(){
	if(d[y+1][x]) {
	k=3; 
	y+=2; 
	cout<<"D";
	}
	else if(d[y][x-1]) {
	k=1; 
	x--; 
	cout<<"L";
	}
	else if(d[y-1][x]){
		k=2;
		y-=2;
		cout<<"U";
	}
	else{
		k=0;
		x++;
		cout<<"R";
	}

}
void U(){
	if(d[y][x-1]) {
	k=1; 
	x--; 
	cout<<"L";
	}
	else if(d[y-1][x]) {
	k=2; 
	y-=2; 
	cout<<"U";
	}
	else if(d[y][x]){
		k=0;
		x++;
		cout<<"R";
	}
	else{
		k=3;
		y+=2;
		cout<<"D";
	}

}
void D(){
	if(d[y][x]) {
	k=0; 
	x++; 
	cout<<"R";
	}
	else if(d[y+1][x]) {
	k=3; 
	y+=2; 
	cout<<"D";
	}
	else if(d[y][x-1]){
		k=1;
		x--;
		cout<<"L";
	}
	else{
		k=2;
		y-=2;
		cout<<"U";
	}

}

void tansaku(){
	
	while(!(x==1&&y==1)){
		switch(k){
		case 0: R();break;
		case 1: L();break;
		case 2: U();break;
		case 3: D();break;
		default:return;
		}
		
	}
}

int main(){
	string s;
	for(int i=1;i<10;i++){
		getline(cin,s);
		if(s[s.size()-1]=='\r')
			s.substr(0,s.size()-1);
		for(int j=0;j<s.size();j++){
			if(i%2!=0){
				d[i][j+1]=s[j]-'0';
			}
			else{
				d[i][j+1]=s[j]-'0';
			}
			
		}
	}
	cout<<"R";
	tansaku();
	cout<<endl;
	

}