#include <bits/stdc++.h>
using namespace std;
const int dx[]={1,0,-1,0,1,-1,-1,1};
const int dy[]={0,1,0,-1,1,1,-1,-1};
const int INF = 1<<30;
const double EPS = 1e-8;
#define PB push_back
#define mk make_pair
#define fr first
#define sc second
#define ll long long
#define reps(i,j,k) for(int i = (j); i < (k); i++)
#define rep(i,j) reps(i,0,j)
#define MOD 1000000007
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
typedef pair<int,int> Pii;
typedef pair<Pii,Pii> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
int main(){
	char d[] = {'R','D','L','U'};
	bool w[5][9]={{false}};
	rep(i,9){
		int lim = 4+i%2;
		rep(j,lim){
			char t;
			cin >> t;
			w[j][i] = (t == '1');
		}
	}
	int x,y,s;
	x = y = s = 0;
	while(true){
		int nx,ny;
		s--;
		s = (s+4) % 4;
		rep(i,4){
			nx = x + dx[s];
			ny = y + dy[s];
			if(nx >= 0 && nx <= 4 && ny >= 0 && ny <= 4){
				if(s%2==0 && w[min(x,nx)][y*2])break;
				if(s%2==1 && w[x][min(y,ny) * 2 + 1])break;
			}
			s++;
			s %= 4;
		}
		y = ny;
		x = nx;
		cout << d[s];
		if((x == 0 && y == 0))break;
	}
	puts("");
	return 0;
}