#include <iostream>
#include <string>
using namespace std;

int a[12][12];
int dx[4]  = {1,0,-1,0};
int dy[4]  = {0,1,0,-1};
char dc[4] = {'R','D','L','U'};

//©ªÌüÍS}XÌÇÌóÔð²×é
void cheakWall(int* wall , const int& px ,const int& py ,const int& d ){
	for(int i=0 ; i<4 ; ++i ){
		int mx = px + dx[(d+i)%4];
		int my = py + dy[(d+i)%4];
		wall[i] = a[my][mx];
	}
}

//iñ¾ü«ðL^
void record(string& s,int* wall){
	if( wall[1] ){
		s.push_back( dc[d] );
	}
}

//iÞ
void go(int& px, int& py, const int& d,int* wall, string& s){
	px += dx[d]*2;
	py += dy[d]*2;
	record(s,wall);
}

int main(){
	string s;

	//zñÌú»
	for(int y=0 ; y<12 ; ++y )
		for(int x=0 ; x<12 ; ++x )
			a[y][x] = 0;

	//üÍ
	for(int i=0 ; i<9 ; ++i ){
		cin >> s;
		int y = i+1;
		int x = (i+1)%2 + 1;
		for(int j=0 ; j<(int)s.size() ; ++j , x+=2 ){
			a[y][x] = s[j] - '0';
		}
	}

	int px = 2, py = 0, d = 0;
	bool flag = false;
	s.clear();

	while( 1 ){
		if( px == 0 && py == 0 ) break;

		int wall[4]; 
		//©ªÌüèÌóÔ
		cheakWall( wall , px , py , d );

		if( !wall[1] ){//EªÇ¶áÈ©Á½ç
			//ü«ðEü«Éñé
			d = (d+1)%4;
			//iÞ
			go( px , py , d , wall , s );
			flag = false;
		}else{
			if( !wall[0] ){//OªÇ¶áÈ©Á½ç
				//iÞ
				go( px , py , d , wall , s );
				flag = false;
			}else{
				if( !wall[3] ){//¶ªÇ¶áÈ©Á½ç
					if( flag == false ){
						//iñ¾ü«ðL^
						record(s,wall);
					}
					//ü«ð¶ü«Éñé
					d = (d+3)%4;
					//iÞ
					go( px , py , d , wall , s );
					flag = false;
				}else{//OEEE¶ªÇ¾Á½ç
					flag = true;
					//iñ¾ü«ðL^
					record(s,wall);
					//ü«ðEü«Éñé
					d = (d+3)%4;
					//iñ¾ü«ðL^
					s.push_back( dc[d] );
				}
			}
		}
	}
	cout << s << endl;
}