#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
 
using namespace std;
 
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define repc(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define mp make_pair
#define all(r) r.begin(),r.end()
#define fi first
#define se second
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

typedef pair<int, pii> pip;
 
 
 
const int INF = 1000000;
const double EPS = 1e-8;
const int mod = 1e9 + 7;

int dx[]={1,0,-1,0};
int dy[]={0,-1,0,1};

int main(){
	int p[5][5][4];
	memset(p, 0, sizeof(p));
	string s;
	rep(i, 9){
		cin>>s;
		rep(j, s.size()){
			if(s[j] == '1'){
				if(i%2 == 0){
					p[i/2][j][0] = 1;
					p[i/2][j + 1][2] = 1;
				}else{
					p[i/2][j][3] = 1;
					p[i/2 + 1][j][1] = 1;
				}
			}
		}
	}

	int dir = 0;
	s ="RULD";
	int x = 0, y = 0;
	while(1){
		if(dir == 0){
			if(p[y][x][1]){
				dir = 1;
			}else if(p[y][x][0]){

			}else if(p[y][x][3]){
				dir = 3;
			}else if(p[y][x][2]){
				dir = 2;
			}
		}else if(dir == 1){
			if(p[y][x][2]){
				dir = 2;
			}else if(p[y][x][1]){

			}else if(p[y][x][0]){
				dir = 0;
			}else if(p[y][x][3]){
				dir = 3;
			}
		}else if(dir == 2){
			if(p[y][x][3]){
				dir = 3;
			}else if(p[y][x][2]){

			}else if(p[y][x][1]){
				dir = 1;
			}else if(p[y][x][0]){
				dir = 0;
			}
		}else{
			if(p[y][x][0]){
				dir = 0;
			}else if(p[y][x][3]){

			}else if(p[y][x][2]){
				dir = 2;
			}else if(p[y][x][1]){
				dir = 1;
			}
		}
		cout<<s[dir];
		x += dx[dir];
		y += dy[dir];
		//printf(" (%d, %d)\n", x, y);
		if(x == 0 && y == 0) break;
	}
	printf("\n");
}