#include<iostream>
#include<cstdio>
#include<math.h>
#include<queue>
using namespace std;

int main(){
	char stage[9][5] = {};
	for (int i = 0; i < 9; i++){
		cin >> stage[i];
		for (int j = 0; j < 5; j++){
			if (stage[i][j] != 0){
				stage[i][j] -= '0';
			}
		}
	}

	//for (int i = 0; i < 9; i++){ for (int j = 0; j < 5; j++) printf("%d ", stage[i][j]); puts(""); }

	int y = 0, x = 0, ny, nx, situ = 1;
	int situ_y[4] = { -1, 0, 1, 0 }, situ_x[4] = { 0, 0, 0, -1 };
	int np_y[4] = { -2, 0, 2, 0 }, np_x[4] = { 0, 1, 0, -1 };
	char situ_char[4] = { 'U', 'R', 'D', 'L' };
	do{
		situ += 3;
		situ %= 4;
		//printf("%d,%d  ", x, y);
		for (int i = 0; i < 4; i++, situ = (situ + 1) % 4){
			ny = y + situ_y[situ];
			nx = x + situ_x[situ];
			//printf(" %d:%d,%d", situ, ny, nx);
			if (ny < 0 || 8 < ny || nx < 0 || 4 < nx) continue;
			if (stage[ny][nx] == 1){
				y += np_y[situ];
				x += np_x[situ];
				//printf("test\n");
				printf("%c", situ_char[situ]);
				break;
			}
		}
	} while (y != 0 || x != 0);
	puts("");
	return 0;
}