#include <iostream>
using namespace std;

int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
char dc[] = "RDLU";

int main() {
	int g[11][11] = {};
	char c;
	for (int i=1; i<10; ++i) {
		for (int j=1+i%2; j<=9; j+=2) {
			cin >> c;
			g[i][j] |= c - '0';
		}
	}
	int x=1, y=1, d=0;
	do {
		for (int t=d+3; ; ++t) {
			if (g[y + dy[t%4]][x + dx[t%4]]) {
				d = t%4;
				break;
			}
		}
		x += dx[d] * 2;
		y += dy[d] * 2;
		cout << dc[d];
	} while (x != 1 || y != 1);
	cout << endl;
	return 0;
}