#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 checkTable[9][5],row,col;
	char array[9][6];

	for(int i = 0; i < 9; i++){
		for(int k=0; k < 5; k++){
			checkTable[i][k] = 0;
		}
	}

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

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

	checkTable[0][0] = 1;

	row = 0,col = 0;

	bool FLG = true;

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

	}

	FLG = true;

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

	}


	printf("L\n");

    return 0;
}