#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
using namespace std;


int main(){
	char w1[7][7],w2[7][7],dir;
	int x=1,y=1;
	for(int i=0;i<7;i++){
		for(int j=0;j<7;j++){
			w1[i][j] = '0';
			w2[i][j] = '0';
		}
	}
	fgets(w1[1],7,stdin);
	fgets(w2[1],7,stdin);
	fgets(w1[2],7,stdin);
	fgets(w2[2],7,stdin);
	fgets(w1[3],7,stdin);
	fgets(w2[3],7,stdin);
	fgets(w1[4],7,stdin);
	fgets(w2[4],7,stdin);
	fgets(w1[5],7,stdin);
	
	for(int i=5;i>=0;i--){
		w1[1][i+1]=w1[1][i];
		w2[1][i+1]=w2[1][i];
		w1[2][i+1]=w1[2][i];
		w2[2][i+1]=w2[2][i];
		w1[3][i+1]=w1[3][i];
		w2[3][i+1]=w2[3][i];
		w1[4][i+1]=w1[4][i];
		w2[4][i+1]=w2[4][i];
		w1[5][i+1]=w1[5][i];
	}
	w1[1][0]='0';
	w2[1][0]='0';
	w1[2][0]='0';
	w2[2][0]='0';
	w1[3][0]='0';
	w2[3][0]='0';
	w1[4][0]='0';
	w2[4][0]='0';
	w1[5][0]='0';/*
	for(int i=0;i<7;i++){
		for(int j=0;j<7;j++){
			if(w1[i][j]=='1') printf("+-");
			else printf("+ ");
		}
		printf("+\n");
		for(int j=0;j<7;j++){
			if(w2[i][j]=='1') printf("| ");
			else printf("  ");
		}
		
		printf("\n");
	}*/
	printf("R");
	dir = 'R';
	while(1){
		if(dir=='R'){
			if(w2[x-1][y+1]=='1'){
				dir = 'U';
				x = x-1;
				y = y+1;
			}
			else if(w1[x][y+1]=='1'){
				dir = 'R';
				x = x;
				y = y+1;
			}
			else if(w2[x][y+1]=='1'){
				dir = 'D';
				x = x;
				y = y+1;
			}
			else {
				dir = 'L';
				x = x;
				y = y;
			}
		}
		else if(dir=='L'){
			if(w2[x][y]=='1'){
				dir = 'D';
				x = x;
				y = y;
			}
			else if(w1[x][y-1]=='1'){
				dir = 'L';
				x = x;
				y = y-1;
			}
			else if(w2[x-1][y]=='1'){
				dir = 'U';
				x = x-1;
				y = y;
			}
			else {
				dir = 'R';
				x = x;
				y = y;
			}
		}
		else if(dir=='U'){
			if(w1[x][y-1]=='1'){
				dir = 'L';
				x = x;
				y = y-1;
			}
			else if(w2[x-1][y]=='1'){
				dir = 'U';
				x = x-1;
				y = y;
			}
			else if(w1[x][y]=='1'){
				dir = 'R';
				x = x;
				y = y;
			}
			else {
				dir = 'D';
				x = x;
				y = y;
			}
		}
		
		else if(dir=='D'){
			if(w1[x+1][y]=='1'){
				dir = 'R';
				x = x+1;
				y = y;
			}
			else if(w2[x+1][y]=='1'){
				dir = 'D';
				x = x+1;
				y = y;
			}
			else if(w1[x+1][y-1]=='1'){
				dir = 'L';
				x = x+1;
				y = y-1;
			}
			else {
				dir = 'U';
				x = x;
				y = y;
			}
		}
		printf("%c",dir);
		if(x==1&&y==1)break;
	}
	printf("\n");
	return 0;
}
