#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to) 
int r[7][6];
int c[6][7];

void turn() {
	int nr[7][6], nc[6][7];
	rep(i,6) {
		rep(j,7) {
			nc[i][j] = r[6-j][i];
		}
	}
	rep(i,7) {
		rep(j,6) {
			nr[i][j] = c[5-j][i];
		}
	}
	rep(i,7) {
		rep(j,6) {
			r[i][j] = nr[i][j];
		}
	}
	rep(i,6) {
		rep(j,7) {
			c[i][j] = nc[i][j];
		}
	}
}

int main() {
	rep(i,7) {
		rep(j,6) {
			r[i][j] = 0;
		}
	}
	rep(i,6) {
		rep(j,7) {
			c[i][j] = 0;
		}
	}
	string s;
	rep2(i,1,5) {
		cin >> s;
		rep2(j,1,5) {
			
			r[i][j] = s[j-1] - '0';
		}
		cin >> s;
		rep2(j,1,6) {
			c[i][j] = s[j-1] - '0';
		}
	}
	cin >> s;
	rep2(i,1,5) {
		r[5][i] = s[i-1] - '0';
	}

	int x = 0, y = 0;
	int gx = 0, gy = 0;
	char d[4] = {'R', 'U', 'L', 'D'};
	int dir = 0;
	while(1) {		
		if(!c[y][x+1] && !c[y+1][x+1] && !r[y+1][x+1]) {
			// turn 180
			dir = (dir+2) % 4;
			cout << d[dir];
			rep(i,2) turn();
			x = 4 - x;
			y = 4 - y;
			gx = 4 - gx;
			gy = 4 - gy;
			x++;
			if(x == gx && y == gy) break;
			continue;
		}
		if(c[y][x+1] == 1) {
			// turn left
			dir = (dir+1) % 4;
			cout << d[dir];
			turn();
			swap(y = 4 - y, x);
			swap(gy = 4 - gy, gx);
			x++;
			if(x == gx && y == gy) break;

			continue;
		} 
		if(r[y+1][x+1] == 1) {
			// go straight
			cout << d[dir];
			x++;
			if(x == gx && y == gy) break;
			continue;
		}
		if(c[y+1][x+1] == 1) {
			// turn right
			dir = (dir+3) % 4;
			cout << d[dir];
			rep(i,3) turn();
			swap(x = 4 - x, y);
			swap(gx = 4 - gx, gy);
			x++;
			if(x == gx && y == gy) break;

		}
	}
	cout << endl;
	return 0;
}