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

enum eCOURSE{
	COURSE_U,
	COURSE_R,
	COURSE_D,
	COURSE_L,
};

struct tDataSet{
	int *pX, *pY, *field;
	eCOURSE* course;
};

const int SIZE_X = 7;
const int SIZE_Y = 11;

bool checkGoal( tDataSet& data ){
	if ( ( *data.pX == 0 && *data.pY == 1 && *data.course == COURSE_U && data.field[ 2*SIZE_X + 1 ] ) ||
		 ( *data.pX == 1 && *data.pY == 1 && *data.course == COURSE_L && data.field[ 1*SIZE_X + 1 ] && !data.field[ 2*SIZE_X + 1 ] ) ){
		return true;
	}
	return false;
}

int main(){
	string s;
	int field[ SIZE_Y * SIZE_X ];

	for ( int i = 0; i < SIZE_Y * SIZE_X; ++i ){
		field[ i ] = 0;
	}

	for ( int i = 1; i < SIZE_Y - 1; ++i ){
		cin >> s;
		for ( unsigned j = 0; j < s.size(); ++j ){
			field[ i*7 + (j+1) ] = static_cast< int >( s[ j ] - '0' );
		}
	}

	s = "";
	int pX = 1, pY = 0;
	eCOURSE course = COURSE_R;

	tDataSet data;
	data.pX = &pX;
	data.pY = &pY;
	data.course = &course;
	data.field = field;

	bool goal = false;

	while ( !goal ){
		int defU = ( 2 * pY ) * SIZE_X + ( pX + 1 );
		int defR = ( 2 * pY + 1 ) * SIZE_X + pX;
		int defD = ( 2 * pY ) * SIZE_X + pX;
		int defL = ( 2 * ( pY - 1 ) + 1 ) * SIZE_X + pX;

		switch ( course ){
			case COURSE_U : 
				if ( field[ defU ] ){
					s += 'U';
					goal = checkGoal( data );
					if ( field[ defL ] ){
						course = COURSE_L;
					}else{
						--pY;
					}
				}else{
					course = COURSE_R;
					++pX;
				}
				break;
			case COURSE_R :
				if ( field[ defR ] ){
					s += 'R';
					goal = checkGoal( data );
					if ( field[ defU ] ){
						course = COURSE_U;
					}else{
						++pX;
					}
				}else{
					course = COURSE_D;
					++pY;
				}
				break;
			case COURSE_D :
				if ( field[ defD ] ){
					s += 'D';
					goal = checkGoal( data );
					if ( field[ defR ] ){
						course = COURSE_R;
					}else{
						++pY;
					}
				}else{
					course = COURSE_L;
					--pX;
				}
				break;
			case COURSE_L :
				if ( field[ defL ] ){
					s += 'L';
					goal = checkGoal( data );
					if ( field[ defD ] ){
						course = COURSE_D;
					}else{
						--pX;
					}
				}else{
					course = COURSE_U;
					--pY;
				}
				break;
			
		}
	}

	cout << s << endl;

	return 0;
}