#include <cstdio>

using namespace std;

#define rep(i,n) for(int i=0; i<int(n); ++i)

int main()
{
	int field[5][5] = {{0}};
	rep(i, 9){
		char str[6];
		scanf("%s", str);
		if(i%2){
			rep(j, 5){
				int a = str[j]-'0';
				field[i/2][j] |= a<<2;
				field[i/2+1][j] |= a;
			}
		}else{
			rep(j, 4){
				int a = str[j]-'0';
				field[i/2][j] |= a<<1;
				field[i/2][j+1] |= a<<3;
			}
		}
	}

	putchar('R');
	int y=0, x=1;
	int pre = 1;
	bool right = false;
	do{
		// printf("(%d, %d)\n", x, y);
		pre = (pre+2)%4;
		int dire = pre;
		do{
			dire = (dire + right*2+1)%4;
		}while(!((field[y][x]>>dire)&1));
		if(dire == pre)
			right = !right;
		pre = dire;
		putchar("URDL"[dire]);

		int dx[] = {0, 1, 0, -1};
		int dy[] = {-1, 0, 1, 0};
		x += dx[dire];
		y += dy[dire];
	}while(y!=0 || x!=0 || right);
	puts("");

	return 0;
}