#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int, int>P;

int dx[]{ 0,1,0,-1 }, dy[]{ 1,0,-1,0 };
char dir[] = "RDLU";
bool b[5][5][5][5];
int main() {
	rep(i, 9) {
		rep(j, i & 1 ? 5 : 4) {
			int d; scanf("%1d", &d);
			if (i & 1)b[i / 2][j][i / 2 + 1][j] = b[i / 2 + 1][j][i / 2][j] = d;
			else b[i / 2][j][i / 2][j + 1] = b[i / 2][j + 1][i / 2][j] = d;
		}
	}
	int id = 0, x = 0, y = 0;
	do {
		for (int i = 3;; i++) {
			int nx = x + dx[(id + i) % 4], ny = y + dy[(id + i) % 4];
			if (0 <= nx&&nx < 5 && 0 <= ny&&ny < 5 && b[x][y][nx][ny]) {
				x = nx; y = ny; (id += i) %= 4; printf("%c", dir[id]); break;
			}
		}
	} while (x != 0 || y != 0);
	printf("\n");
}