#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>  
#include<map>
#include<set>
using namespace std;

int main(){
	bool f[13][13]={};
	int TT[15][15]={};
	string p,q;
	for(int i=1;i<=4;i++){
		cin>>p>>q;
		for(int j=0;j<p.size();j++)
			if(p[j]=='1')f[2*i-1][j+1]=1;
		for(int j=0;j<q.size();j++)
			if(q[j]=='1')f[i*2][j+1]=1;
	}
	cin>>p;
		for(int j=0;j<p.size();j++)
			if(p[j]=='1')f[9][j+1]=1;
	/*for(int i=0;i<=10;i++){
		for(int j=0;j<=5;j++)
			cout<<f[i][j];
		cout<<endl;
	}*/
	int x=1,y=1;
	char z='R';int v=0;
	while(1){
		if(z=='R'){
			if(f[y-1][x]){
				cout<<"U";z='U';y-=2;
			}
			else if(f[y][x]){
				cout<<"R";z='R';x++;
			}
			else if(f[y+1][x]){
				cout<<"D";z='D';y+=2;
			}
			else{
				cout<<"L";z='L';x--;
			}


		}
		else if(z=='L'){
			if(f[y+1][x]){
				cout<<"D";z='D';y+=2;
			}
			else if(f[y][x-1]){
				cout<<"L";z='L';x--;
			}
			else if(f[y-1][x]){
				cout<<"U";z='U';y-=2;
			}
			else{
				cout<<"R";z='R';x++;
			}
		}

		else if(z=='U'){
			if(f[y][x-1]){
				cout<<"L";z='L';x--;
			}
			else if(f[y-1][x]){
				cout<<"U";z='U';y-=2;
			}
			else if(f[y][x]){
				cout<<"R";z='R';x++;
			}
			else{
				cout<<"D";z='D';y+=2;
			}
		}
		else if(z=='D'){
			if(f[y][x]){
				cout<<"R";z='R';x++;
			}
			else if(f[y+1][x]){
				cout<<"D";z='D';y+=2;
			}
			else if(f[y][x-1]){
				cout<<"L";z='L';x--;
			}
			else{
				cout<<"U";z='U';y-=2;
			}
		}
		if(x==1&&y==1)break;
		v++;
		//if(v>30)break;
		//cout<<x<<" "<<y<<"#"<<v<<endl;
		TT[y][x]=v;
	}/*
	for(int i=0;i<=10;i++){
		for(int j=0;j<=5;j++)
			cout<<TT[i][j];
		cout<<endl;
	}
	*/

	cout<<endl;
	return 0;
}