#include <iostream>
using namespace std;

int main(){
	int muki = 1;//0 is n,1 is e,2 is s,3 is w
	int t = 1, myoko= 1, mtate = 0;
	char yoko[7][6], tate[7][6];
	for(int i = 0; i < 7; i++){
		for(int j = 0; j < 6; j++){
			yoko[i][j] = '0';
			tate[i][j] = '0';
		}
	}
	for(int i = 1; i < 10; i++){
		if(i % 2 != 0){
			for(int j = 1; j < 5; j++){
				cin >> yoko[(i/2)+1][j];
			}
		}
		else{
			for(int j = 1; j < 6; j++){
				cin >> tate[j][t];
			}
			t++;
		}
	}
	cout << "R";
	while(myoko != 0 || mtate != 0){
		if(muki == 0){
			if(yoko[mtate+1][myoko] == '1'){
				myoko = myoko-1;
				cout << "L";
				muki = 3;
			}
			else if(tate[myoko+1][mtate] == '1'){
				mtate = mtate-1;
				cout << "U";
				muki = 0;
			}
			else if(yoko[mtate+1][myoko+1] == '1'){
				myoko = myoko+1;
				cout << "R";
				muki = 1;
			}
			else{
				mtate = mtate+1;
				cout << "D";
				muki = 2;
			}
		}
		else if(muki == 1){
			if(tate[myoko+1][mtate] == '1'){
				mtate = mtate-1;
				cout << "U";
				muki = 0;
			}
			else if(yoko[mtate+1][myoko+1] == '1'){
				myoko = myoko+1;
				cout << "R";
				muki = 1;
			}
			else if(tate[myoko+1][mtate+1] == '1'){
				mtate = mtate+1;
				cout << "D";
				muki = 2;
			}
			else{
				myoko = myoko-1;
				cout << "L";
				muki = 3;
			}
		}
		else if(muki == 2){
			if(yoko[mtate+1][myoko+1] == '1'){
				myoko = myoko+1;
				cout << "R";
				muki = 1;
			}
			else if(tate[myoko+1][mtate+1] == '1'){
				mtate = mtate+1;
				cout << "D";
				muki = 2;
			}
			else if(yoko[mtate+1][myoko] == '1'){
				myoko = myoko-1;
				cout << "L";
				muki = 3;
			}
			else{
				mtate = mtate-1;
				cout << "U";
				muki = 0;
			}
		}
		else{
			if(tate[myoko+1][mtate+1] == '1'){
				mtate = mtate+1;
				cout << "D";
				muki = 2;
			}
			else if(yoko[mtate+1][myoko] == '1'){
				myoko = myoko-1;
				cout << "L";
				muki = 3;
			}
			else if(tate[myoko+1][mtate] == '1'){
				mtate = mtate-1;
				cout << "U";
				muki = 0;
			}
			else{
				myoko = myoko+1;
				cout << "R";
				muki = 1;
			}
		}
	}
	cout << endl;
}