#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

int hk=5; //0:上 1:右 2:下 3:左
int cnt=0;
string  w[12],ans="";
string shk[4]={"U","R","D","L"};

	rep(i,9) {
		cin >> w[i+1] ;
		w[i+1] = " " + w[i+1];
	}

	int x=1, y=1;
	if(w[1][1]=='1') { hk = 1; cout <<"R";}
	else			 {hk = 2; cout << "U";}

	while(1){
//		printf("\n%d h=%d (%d,%d) %c:",cnt,hk,y,x,w[y][x]);
		switch( hk){
		case  0:
			if(w[y-1][x-1] == '1' ) {
				hk = 3; y--; x--;}
			else if(w[y-2][x] == '1') {
				hk = 0; y -=2;}
			else if(w[y-1][x] == '1'){
				hk = 1; y--;}
			else {
				hk = 2; }
			break;
		case 1:
			if(w[y-1][x+1] == '1' ){
				hk = 0; y--; x++;}
			else if(w[y][x+1] == '1') {
				hk = 1; x++;}
			else if(w[y+1][x+1] == '1'){
				hk = 2; y++; x++;}
			else {
				hk = 3; }
			break;
		case 2:
			if(w[y+1][x] == '1' ) {
				hk = 1; y++; }
			else if(w[y+2][x] == '1' ) {
				hk = 2; y +=2;}
			else if( w[y+1][x-1] == '1'){
				hk = 3; y++; x--;}
			else {
				hk = 0;}
			break;
		case 3:
			if(w[y+1][x] == '1' ){
				hk = 2; y++; }
			else if(w[y][x-1] == '1') {
				hk = 3; x--;}
			else if( w[y-1][x] == '1'){
				hk = 0; y--; }
			else {
				hk = 1; }
			break;
		}
		cout << shk[hk];
//		ans = ans + shk[hk];
		cnt++; if(cnt>200) break;
		if(x==1 && y ==1) break;
	}	
	cout << endl;
//	cout << ans << endl;
	
	return 0;
	
	
}