#include<cstdio>

int main(){
	char a[4][5];
	char b[5][4];
	int d = 2;
	int x = 0, y = 0;
	for(int i = 0; i < 4; i++){
		scanf("%c%c%c%c\n", &a[0][i], &a[1][i], &a[2][i], &a[3][i]);
		scanf("%c%c%c%c%c\n", &b[0][i], &b[1][i], &b[2][i], &b[3][i], &b[4][i]);
	}
	scanf("%c%c%c%c", &a[0][4], &a[1][4], &a[2][4], &a[3][4]);

	while(d){
		if(d == 2){
			if(y && b[x][y-1] - '0'){
				d = 1;
				y--;
				printf("U");
			}else if(x == 4){
				d = 3;
			}else if(a[x][y] - '0'){
				x++;
				printf("R");
			}else{
				d = 3;
			}
		}
		if(d == 3){
			if(x - 4 && a[x][y] - '0'){
				d = 2;
				x++;
				printf("R");
			}else if(y == 4){
				d = 4;
			}else if(b[x][y] - '0'){
				y++;
				printf("D");
			}else{
				d = 4;
			}
		}
		if(d == 4){
			if(y - 4 && b[x][y] - '0'){
				d = 3;
				y++;
				printf("D");
			}else if(x == 0){
				if(y == 0){
					printf("\n");
					return 0;
				}
				d = 1;
			}else if(a[x-1][y] - '0'){
				x--;
				printf("L");
			}else{
				d = 1;
			}
		}
		if(d == 1){
			if(x && a[x-1][y] - '0'){
				d = 4;
				x--;
				printf("L");
			}else if(y == 0){
				if(x == 0){
					printf("\n");
					return 0;
				}
				d = 2;
			}else if(b[x][y-1] - '0'){
				y--;
				printf("U");
			}else{
				d = 2;
			}
		}
	}
}