#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10
#define MAX_M 100100

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int table[100][100];
string s;

int dx[] = { 0, 1, 0, -1, 0, 1, 0, -1 };
int dy[] = { -1, 0, 1, 0, -1, 0, 1, 0 };
char c[] = "URDLURDL";

int main(){
	REP(i, 9){
		cin >> s;
		REP(j, s.size()){
			if (i % 2 == 0)	table[i][2 * j + 1] = s[j] - '0';
			else table[i][2 * j] = s[j] - '0';
		}
	}
	bool f = 0;
	string ans = "";
	int x = 0, y = 0, muki = 0;
	while (1){
		if (f&&x == 0 && y == 0)break;
		int ny, nx;
		for (int i = muki; i < muki + 4; i++){
			nx = x + dx[i], ny = y + dy[i];
			if (nx >= 0 && nx <= 8 && ny >= 0 && ny <= 8){
				if (table[ny][nx] == 1){
					x += 2 * dx[i];
					y += 2 * dy[i];
					ans += c[i];
					if (c[i] == 'U')muki = 3;
					else if (c[i] == 'R')muki = 0;
					else if (c[i] == 'D')muki = 1;
					else muki = 2;
					break;
				}
			}
		}
		f = 1;
	}
	cout << ans << endl;
}