#include <iostream>
using namespace std;

struct point {
	int left;
	int down;
	int right;
	int up;
};

void move(point able[5][5], int& x, int& y, int& direction){
	switch(direction){
	case 0: 
		if(able[y][x].down){
			y++;
			direction = 3;
			cout << "D";
		}else if(able[y][x].left){
			x--;
			direction = 0;
			cout << "L";
		}else if(able[y][x].up){
			y--;
			direction = 1;
			cout << "U";
		}else if(able[y][x].right){
			x++;
			direction = 2;
			cout << "R";
		}
		break;
	case 1:
		if(able[y][x].left){
			x--;
			direction = 0;
			cout << "L";
		}else if(able[y][x].up){
			y--;
			direction = 1;
			cout << "U";
		}else if(able[y][x].right){
			x++;
			direction = 2;
			cout << "R";
		}else if(able[y][x].down){
			y++;
			direction = 3;
			cout << "D";
		}
		break;
	case 2:
		if(able[y][x].up){
			y--;
			direction = 1;
			cout << "U";
		}else if(able[y][x].right){
			x++;
			direction = 2;
			cout << "R";
		}else if(able[y][x].down){
			y++;
			direction = 3;
			cout << "D";
		}else if(able[y][x].left){
			x--;
			direction = 0;
			cout << "L";
		}
		break;
	case 3:
		if(able[y][x].right){
			x++;
			direction = 2;
			cout << "R";
		}else if(able[y][x].down){
			y++;
			direction = 3;
			cout << "D";
		}else if(able[y][x].left){
			x--;
			direction = 0;
			cout << "L";
		}else if(able[y][x].up){
			y--;
			direction = 1;
			cout << "U";
		}
	}
}

int main(){
	int direction = 3;
	int x = 0, y = 0;
	point able[5][5];
	char c;
	for(int i = 0; i < 5; i++)
		for(int j = 0; j < 5; j++){
			able[i][j].left = 0;
			able[i][j].right = 0;
			able[i][j].down = 0;
			able[i][j].up = 0;
		}
	for(int i = 0; i < 5; i++){
		for(int j = 0; j < 4; j++){
			cin >> c;
			if(c == '1'){
				able[i][j].right = 1;
				able[i][j+1].left = 1;
			}
		}
		if(i == 4) break;
		for(int j = 0; j < 5; j++){
			cin >> c;
			if(c == '1'){
				able[i][j].down = 1;
				able[i+1][j].up = 1;
			}
		}
	}
	move(able, x, y, direction);
	while(x != 0 || y != 0){
		move(able, x, y, direction);
	}
	cout << endl;
	return 0;
}