#include <iostream>
#include <string>

using namespace std;

int main() {
	int data[5][5][5][5];

	for (int i = 0; i < 9; i++) {
		string a;
		if (i % 2 == 0) {
			int k = i/2;
			cin >> a;
			data[k][0][k][1] = data[k][1][k][0] = a[0]-'0';
			data[k][1][k][2] = data[k][2][k][1] = a[1]-'0';
			data[k][2][k][3] = data[k][3][k][2] = a[2]-'0';
			data[k][3][k][4] = data[k][4][k][3] = a[3]-'0';
		} else {
			int k = i/2;
			cin >> a;
			data[k][0][k+1][0] = data[k+1][0][k][0] = a[0]-'0';
			data[k][1][k+1][1] = data[k+1][1][k][1] = a[1]-'0';
			data[k][2][k+1][2] = data[k+1][2][k][2] = a[2]-'0';
			data[k][3][k+1][3] = data[k+1][3][k][3] = a[3]-'0';
			data[k][4][k+1][4] = data[k+1][4][k][4] = a[4]-'0';
		}
	}
	cout << 'R';
	int p[4] = {0};
	p[3] = 1;
	int pp = 0;
	while (p[2] != 0 || p[3] != 0) {
		if (pp == 0) {
			if (p[2] != 0 && data[p[2]][p[3]][p[2]-1][p[3]] == 1) {
				cout << 'U';
				p[0] = p[2];
				p[1] = p[3];
				p[2]--;
				pp = 3;
			} else if (p[3] != 4 && data[p[2]][p[3]][p[2]][p[3]+1] == 1) {
				cout << 'R';
				p[0] = p[2];
				p[1] = p[3];
				p[3]++;
				pp = 0;
			} else if (p[2] != 4 && data[p[2]][p[3]][p[2]+1][p[3]] == 1) {
				cout << 'D';
				p[0] = p[2];
				p[1] = p[3];
				p[2]++;
				pp = 1;
			} else {
				cout << 'L';
				p[0] = p[2];
				p[1] = p[3];
				p[3]--;
				pp = 2;
			}
		} else if (pp == 1) {
			if (p[3] != 4 && data[p[2]][p[3]][p[2]][p[3]+1] == 1) {
				cout << 'R';
				p[0] = p[2];
				p[1] = p[3];
				p[3]++;
				pp = 0;
			} else if (p[2] != 4 && data[p[2]][p[3]][p[2]+1][p[3]] == 1) {
				cout << 'D';
				p[0] = p[2];
				p[1] = p[3];
				p[2]++;
				pp = 1;
			} else if (p[3] != 0 && data[p[2]][p[3]][p[2]][p[3]-1] == 1){
				cout << 'L';
				p[0] = p[2];
				p[1] = p[3];
				p[3]--;
				pp = 2;
			} else {
				cout << 'U';
				p[0] = p[2];
				p[1] = p[3];
				p[2]--;
				pp = 3;
			}
		} else if (pp == 2) {
			if (p[2] != 4 && data[p[2]][p[3]][p[2]+1][p[3]] == 1) {
				cout << 'D';
				p[0] = p[2];
				p[1] = p[3];
				p[2]++;
				pp = 1;
			} else if (p[3] != 0 && data[p[2]][p[3]][p[2]][p[3]-1] == 1){
				cout << 'L';
				p[0] = p[2];
				p[1] = p[3];
				p[3]--;
				pp = 2;
			} else if (p[2] != 0 && data[p[2]][p[3]][p[2]-1][p[3]] == 1) {
				cout << 'U';
				p[0] = p[2];
				p[1] = p[3];
				p[2]--;
				pp = 3;
			} else {
				cout << 'R';
				p[0] = p[2];
				p[1] = p[3];
				p[3]++;
				pp = 0;
			}
		} else {
			if (p[3] != 0 && data[p[2]][p[3]][p[2]][p[3]-1] == 1){
				cout << 'L';
				p[0] = p[2];
				p[1] = p[3];
				p[3]--;
				pp = 2;
			} else if (p[2] != 0 && data[p[2]][p[3]][p[2]-1][p[3]] == 1) {
				cout << 'U';
				p[0] = p[2];
				p[1] = p[3];
				p[2]--;
				pp = 3;
			} else if (p[3] != 4 && data[p[2]][p[3]][p[2]][p[3]+1] == 1) {
				cout << 'R';
				p[0] = p[2];
				p[1] = p[3];
				p[3]++;
				pp = 0;
			} else {
				cout << 'D';
				p[0] = p[2];
				p[1] = p[3];
				p[2]++;
				pp = 1;
			}
		}
	}
	cout << endl;
	return 0;
}