#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <memory.h>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main() {
	int g[100][100];
	memset(g, 0, sizeof(g));
	rep(i, 9) rep(j, 4 + i % 2) {
		char c;
		cin >> c;
		g[i + 1][j * 2 + (i + 1) % 2 + 1] = c - '0';
	}
	int dx[] = {0, 1, 0, -1};
	int dy[] = {-1, 0, 1, 0};
	char c[] = "URDL";
	int x = 2, y = 0, v = 1;
	do {
		cout << c[v];
		int pv = (v - 1 + 4) % 4;
		int nv = (v + 1) % 4;
		
		if (g[y + dy[v]][x + dx[v]] == 1) {
			v = pv;
		}
		else if (g[y + dy[v] * 2 + dy[nv]][x + dx[v] * 2 + dx[nv]] == 1) {
			x += dx[v] * 2;
			y += dy[v] * 2;
		}
		else {
			x += dx[v] * 2;
			x += dx[nv] * 2;
			y += dy[v] * 2;
			y += dy[nv] * 2;
			v = nv;
		}
		if (x == 0 && y == 0) break;
		if (x == 2 && y == 0) break;
	} while(true);
	cout << endl;
	
	return 0;
}