#include <stdio.h>
#include <string>

using namespace std;

int main(void) {
	int row, col;
	char direction = 'R';

	//char str[11][6] = { "00000","1111","00001","0110","01011","0010","01111","0010","01001","0111","00000" };
	char str[11][6] = {'\0'};
	for (int i = 1; i < 10; i++) {
		scanf("%s", str[i]);
	}

	printf("R");
	row = 1;
	col = 1;
	while (1) {
		switch (direction) {
		case 'U':
			//left
			if (col != 0 && str[row][col - 1] == '1') {
				direction = 'L';
				col = col - 1;
				printf("L");
			}
			//up
			else if (row != 1 && str[row - 1][col] == '1') {
				direction = 'U';
				row = row - 2;
				printf("U");
			}
			//right
			else if (col != 4 && str[row][col] == '1') {
				direction = 'R';
				col = col + 1;
				printf("R");
			}
			//down
			else if (row != 9 && str[row + 1][col] == '1') {
				direction = 'D';
				row = row + 2;
				printf("D");
			}
			break;
		case 'D':  
			//right
			if (col != 4 && str[row][col] == '1') {
				direction = 'R';
				col = col + 1;
				printf("R");
			}
			//down
			else if (row != 9 && str[row + 1][col] == '1') {
				direction = 'D';
				row = row + 2;
				printf("D");
			}
			//left
			else if (col != 0 && str[row][col - 1] == '1') {
				direction = 'L';
				col = col - 1;
				printf("L");
			}
			//up
			else if (row != 1 && str[row - 1][col] == '1') {
				direction = 'U';
				row = row - 2;
				printf("U");
			}
			break;
		case 'L':  
			//down
			if (row != 9 && str[row + 1][col] == '1') {
				direction = 'D';
				row = row + 2;
				printf("D");
			}
			//left
			else if (col != 0 && str[row][col - 1] == '1') {
				direction = 'L';
				col = col - 1;
				printf("L");
			}
			//up
			else if (row != 1 && str[row - 1][col] == '1') {
				direction = 'U';
				row = row - 2;
				printf("U");
			}
			//right
			else if (col != 4 && str[row][col] == '1') {
				direction = 'R';
				col = col + 1;
				printf("R");
			}
			break;
		case 'R':  
			//up
			if (row != 1 && str[row - 1][col] == '1') {
				direction = 'U';
				row = row - 2;
				printf("U");
			}
			//right
			else if (col != 4 && str[row][col] == '1') {
				direction = 'R';
				col = col + 1;
				printf("R");
			}
			//down
			else if (row != 9 && str[row + 1][col] == '1') {
				direction = 'D';
				row = row + 2;
				printf("D");
			}
			//left
			else if (col != 0 && str[row][col - 1] == '1') {
				direction = 'L';
				col = col - 1;
				printf("L");
			}
			break;
		}
		if (row == 1 && col == 1) {
			printf("L");
			break;
		}
	}

	printf("\n");

	return 0;
}


