#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

#define East  1
#define South 2
#define West  4
#define North 8

int main()
{
//	cut here before submit 
//	freopen("testcase.pg", "r", stdin);
	string str = "";
	vector <string> grid;
	int maxlen = 0;

	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		int len = str.length();
		maxlen = max (maxlen, len );
		grid.push_back(str );
	} // end while

	int size = grid.size();
	vector <vector <char> > room((size+1)/2+1, vector <char> (maxlen, 0 ) );
	int i,j,k;

	for (i = 0; i < size; ++i){
		for (j = 0; j < grid[i].length(); ++j){
			if (grid[i][j] == '1'){
				if (i % 2 == 0){	// north or south wall
					room[i/2][j] |= South;
				}else{			// east or west wall
					room[i/2+1][j-1] |= East;
				} // end if
			} // end if
		} // end for
	} // end for

	for (i = 0; i < room.size(); ++i){
		for (j = 0; j < room[i].size(); ++j){
			if (i == 0){
				room[i][j] |= North;
			}else if (i == room.size() - 1){
				room[i][j] |= South;
			} // end if
			if (i > 0 && room[i-1][j] & South){
				room[i][j] |= North;
			} // end if
			if (j == 0){
				room[i][j] |= West;
			}else if (j == room[i].size() - 1){
				room[i][j] |= East;
			} // end if
			if (j > 0 && room[i][j-1] & East){
				room[i][j] |= West;
			} // end if
		} // end for
	} // end for

	int row = 0;
	int col = 0;
	int dir = East;
	int right_hand = ( (dir << 1) > 8 ? 1 : (dir << 1) );
	string res = "";
	res += 'R';
	bool turn = false;
	int reach = 0;

	do{
		if (turn || (right_hand & room[row][col]) ){
			turn = false;
			// go faword
			switch (dir){
				case East:
					if (!(room[row][col] & East)){ 
						++col;// res += 'R';
						if (right_hand & room[row][col]){
							res += 'R';
						} // end if
					}else{
						dir = North;
						if (right_hand & room[row][col]){
							res += 'U';
						} // end if
						turn = true;
					} // end if
					break;
				case South:
					if (!(room[row][col] & South)){
					 	++row;// res += 'D';
						if (right_hand & room[row][col]){
							res += 'D';
						} // end if
					}else{
						dir = East;
						if (right_hand & room[row][col]){
							res += 'R';
						} // end if
						turn = true;
					} // end if
					break;
				case West:
					if (!(room[row][col] & West)){
						--col;// res += 'L';
						if (right_hand & room[row][col]){
							res += 'L';
						} // end if
					}else{
						dir = South;
						if (right_hand & room[row][col]){
							res += 'D';
						} // end if
						turn = true;
					} // end if
					break;
				case North:
					if (!(room[row][col] & North)){
						--row;// res += 'U';
						if (right_hand & room[row][col]){
							res += 'U';
						} // end if
					}else{
						dir = West;
						if (right_hand & room[row][col]){
							res += 'L';
						} // end if
						turn = true;
					} // end if  
					break;
			} // end switch
		}else{
			// turn
			switch (dir){
				case East:  dir = South; break;
				case South: dir = West; break;
				case West:  dir = North; break;
				case North: dir = East; break;
			} // end switch
			turn = true;
		} // end if

		right_hand = ( (dir << 1) > 8 ? 1 : (dir << 1) );
		if (row == 1 && col == 0){
			++reach;
		} // end if
	} while (reach < 3);

	cout << res << endl;
	
	return 0;
}