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

#define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++)
#define ALL(x) x.begin(),x.end()
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;

const int N = 5,M = 9;
int edge [25] [25];
const int dx [] = {0,1,0,-1};
const int dy [] = {-1,0,1,0};
string d = "URDL";

bool in_range(int y,int x)
{
	return y >= 0 && y < N && x >= 0 && x < N;
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	FOR(i,0,M){
		string s;
		cin >> s;
		FOR(j,0,s.size()) if(s [j] == '1'){
			if(i % 2 == 0){
				edge [(i / 2) * N + j] [(i / 2) * N + j + 1] = true;
				edge [(i / 2) * N + j + 1] [(i / 2) * N + j] = true;
			}
			else{
				edge [(i / 2) * N + j] [(i / 2 + 1) * N + j] = true;
				edge [(i / 2 + 1) * N + j] [(i / 2) * N + j] = true;
			}
		}
	}

	string ans(1,'R');
	int y = 0,x = 1,dir = 1;
	while(y || x){
		for(int i = 3;i <= 6;i++){
			int ny = y + dy [(dir + i) % 4],nx = x + dx [(dir + i) % 4];
			if(in_range(ny,nx) == false || edge [y * N + x] [ny * N + nx] == false) continue;
			y = ny;
			x = nx;
			ans += d [(dir + i) % 4];
			(dir += i) %= 4;
			break;
		}
	}

	cout << ans << endl;

	return 0;
}