#include <bits/stdc++.h>
using namespace std;

using db = double;
using ll = long long;
using vi = vector <int>;
#define op operator
#define pb push_back

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

const int N = 11;
bool a[N][N][4];
char c[4] = {'R', 'D', 'L', 'U'};

int main() {
	//ios :: sync_with_stdio(0);

	for(int i = 0; i < 9; i ++) {
		string s; cin >> s;
		if(i & 1) {
			for(int j = 0; j < 5; j ++)
				if(s[j] == '1') {
					a[i / 2][j][1] = 1;
					a[i / 2 + 1][j][3] = 1;
				}
		} else {
			for(int j = 0; j < 4; j ++)
				if(s[j] == '1') {
					a[i / 2][j][0] = 1;
					a[i / 2][j + 1][2] = 1;
				}
		}
	}

	int x = 0, y = 0, d = 0;
	for(;;) {
		d = (d + 3) % 4;
		while(!a[x][y][d])
			d = (d + 1) % 4;
		//cout << x << ' ' << y << ' ' << d << '\n';
		x += dx[d]; y += dy[d];
		cout << c[d];
		if(!x && !y) break;
	}
	cout << '\n';

	return 0;
}