#include <iostream>
#include <string>
using namespace std;

bool wall[5][5][4];
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};

int main(){
	string s;
	for(int i = 0; i < 9; ++i){
		cin >> s;

		if(i % 2 == 0){
			for(int j = 0; j < 4; ++j){
				if(s[j] == '1'){
					wall[j][i / 2][0] = wall[j + 1][i / 2][2] = true;
				}
			}
		}
		else{
			for(int j = 0; j < 5; ++j){
				if(s[j] == '1'){
					wall[j][i / 2][1] = wall[j][i / 2 + 1][3] = true;
				}
			}
		}
	}

	s.clear();
	int x = 0, y = 0, dir = 0;
	do{
		s += "RDLU"[dir];
		x += dx[dir];
		y += dy[dir];

		if(wall[x][y][(dir + 3) % 4]){
			dir = (dir + 3) % 4;
		}
		else if(!wall[x][y][dir]){
			if(wall[x][y][(dir + 1) % 4]){
				dir = (dir + 1) % 4;
			}
			else{
				dir = (dir + 2) % 4;
			}
		}
	} while(x != 0 || y != 0 || dir != 0);
	
	cout << s << endl;
}