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

int map[12][12] = {0};
enum Dir{ RIGHT , DOWN , LEFT , UP };
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};
char d[4] = { 'R' , 'D' , 'L' , 'U'};

int main(){
	int x = 2, y = 0, dir = RIGHT;
	string f;

	for(int y=0 ; y<9 ; y++){
		cin >> f;
		for(unsigned int x=0 ; x<f.size() ; x++){
			map[y+1][2*x+((y+1)%2)+1] = f[x] - '0';
		}
	}
	
	while( 1 ){
		if( x==0 && y==2 ) break;
		int mx = x + dx[dir];
		int my = y + dy[dir];
		int nx = x + dx[(dir+1)%4];
		int ny = y + dy[(dir+1)%4];
		if( map[ny][nx] == 1 ){
			cout << d[dir];
		}

		if( map[my][mx] == 0 ){		
			if( map[ny][nx] == 0 ){
				dir = (dir + 1) % 4;
				nx = x + dx[(dir+1)%4];
				ny = y + dy[(dir+1)%4];
				if( map[ny][nx] == 1 ){
					cout << d[dir];
				}
				x += dx[dir] * 2;
				y += dy[dir] * 2;
			}else{
				x += dx[dir] * 2;
				y += dy[dir] * 2;
			}
		}else{
			if( map[ny][nx] == 0 ){
				dir = ( dir + 1 ) % 4;
				nx = x + dx[(dir+1)%4];
				ny = y + dy[(dir+1)%4];
				if( map[ny][nx] == 1 ){
					cout << d[dir];
				}
				x += dx[dir] * 2;
				y += dy[dir] * 2;
			}else{
				dir = ( dir + 3 ) % 4;
			}
		}
	}
	cout << endl;
	return 0;
}