#include <stdio.h>
#include<math.h>
#include <algorithm>
#include <stack>
using namespace std;

bool rangeCheck(int row, int col){
	if(row % 2 == 0){
		if(row >= 0 && row <= 8 && col >= 0 && col <= 3)return true;
		else{
			return false;
		}
	}else{
		if(row >= 0 && row <= 8 && col >= 0 && col <= 4)return true;
		else{
			return false;
		}
	}
}

int main(){
	int row,col;
	char array[9][6];

	for(int i=0;i < 9; i++){
		scanf("%s",array[i]);
	}

	printf("R");
	char current = 'R';

	row = 0,col = 0;

	while(true){
		switch(current){
		case 'L':
			if(rangeCheck(row,col-1)&& array[row][col-1] == '1'){
				printf("L");
				col = col-1;
			}else if(rangeCheck(row+1,col) && array[row+1][col] == '1'){
				printf("D");
				current = 'D';
				row = row+1;
			}else if(rangeCheck(row-1,col) && array[row-1][col] == '1'){
				printf("U");
				current = 'U';
				row = row-1;
			}else{
				printf("R");
				current = 'R';
			}
			break;
		case 'R':
			if(rangeCheck(row,col+1) && array[row][col+1] == '1'){
				printf("R");
				col = col+1;
			}else if(rangeCheck(row-1,col+1) && array[row-1][col+1] == '1'){
				printf("U");
				current = 'U';
				row = row-1;
				col = col+1;
			}else if(rangeCheck(row+1,col+1) && array[row+1][col+1] == '1'){
				printf("D");
				current = 'D';
				row = row+1;
				col = col+1;
			}else{
				printf("L");
				current = 'L';
			}
			break;
		case 'U':
			if(rangeCheck(row-2,col) && array[row-2][col] == '1'){
				printf("U");
				row = row - 2;
			}else if(rangeCheck(row-1,col-1) && array[row-1][col-1] == '1'){
				printf("L");
				current = 'L';
				row = row-1;
				col = col-1;
			}else if(rangeCheck(row-1,col) && array[row-1][col] == '1'){
				printf("R");
				current = 'R';
				row = row-1;
			}else{
				printf("D");
				current = 'D';
			}
			break;
		case 'D':
			if(rangeCheck(row+2,col) && array[row+2][col] == '1'){
				printf("D");
				row = row+2;
			}else if(rangeCheck(row+1,col) && array[row+1][col] == '1'){
				printf("R");
				current = 'R';
				row = row+1;
			}else if(rangeCheck(row+1,col-1) && array[row+1][col-1] == '1'){
				printf("L");
				current = 'L';
				row = row +1;
				col = col -1;
			}else{
				printf("U");
				current = 'U';
			}
			break;
		}
		if(row == 0 && col == 0)break;
	}

	printf("\n");

    return 0;
}