#include "stdio.h"
#include "math.h"

#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
using namespace std;
typedef long long  ll;

/** Problem0037 : Path on a Grid **/
int main()
{
	bool wall[6][6][4]={0};
	string s;
	int y=1;
	rep(k, 9) {
		cin >> s;
		if (s.length()==4) {
			rep(x, 4) {
				if (s[x]=='1') {
					wall[x+1][y-1][3]=true;
					wall[x+1][y][2]=true;
				}
			}
		} else if (s.length()==5) {
			REP(x, 1, 6) {
				if (s[x-1]=='1') {
					wall[x-1][y][1]=true;
					wall[x][y][0]=true;
				}
			}
			y++;
		}
	}
	wall[0][0][3]=true; wall[0][1][2]=true;
	
	int x=1, d=1; y=0;
	cout << "R";
	while (1) {
		switch (d) {
			case 1:
				if (wall[x][y][1]) {
					if (wall[x][y][2]) {
						d=0;
						cout << "U";
					} else {
						y--; d=2;
						cout << "RU";
					}
				} else if (wall[x+1][y][3]) {
					x++; d=1;
					cout << "R";
				} else if (wall[x][y+1][1]) {
					y++; x++; d=3;
					cout << "D";
				} else {
					y++; d=0;
				} break;
				
			case 3:
				if (wall[x][y][3]) {
					if (wall[x][y][1]) {
						d=2;
						cout << "R";
					} else {
						x++; d=1;
						cout << "DR";
					}
				} else if (wall[x][y+1][0]) {
					y++; d=3;
					cout << "D";
				} else if (wall[x-1][y][3]) {
					x--; y++; d=0;
					cout << "L";
				} else {
					x--; d=2;
				} break;
				
			case 0:
				if (wall[x][y][0]) {
					if (wall[x][y][3]) {
						d=1;
						cout << "D";
					} else {
						y++; d=3;
						cout << "LD";
					}
				} else if (wall[x-1][y][2]) {
					x--; d=0;
					cout << "L";
				} else if (wall[x][y-1][0]) {
					x--; y--; d=2;
					cout << "U";
				} else {
					y--; d=1;
				} break;
				
			case 2:
				if (wall[x][y][2]) {
					if (wall[x][y][0]) {
						d=3;
						cout << "L";
					} else {
						x--; d=0;
						cout << "UL";
					}
				} else if (wall[x][y-1][1]) {
					y--; d=2;
					cout << "U";
				} else if (wall[x+1][y][2]) {
					x++; y--; d=1;
					cout << "R";
				} else {
					x++; d=3;
				} break;
		}
		cout << flush;
		if (d==2 && x==0 && y==1)
			break;
		if (d==0 && x==0 && y==1)
			break;
	}
	cout << endl;
	return 0;
}