
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>
#include <set>
#include <numeric>

using namespace std;
bool points[5][5][4];
int main()
{
    for (int i = 0; i < 9; ++i){
        int y = i/2;
        if (i%2 == 0){
            for (int j = 0; j < 4; ++j){
                int e;
                scanf("%1d", &e);
                if (e)
                    points[y][j][1] = points[y][j+1][3] = true;
            }
		} else {
            for (int j = 0; j < 5; ++j){
                int e;
                scanf("%1d", &e);
                if (e)
                    points[y][j][2] = points[y+1][j][0] = true;
            }
        }
    }
 
    int x, y;
    x = 1;
    y = 0;
    int dir = 1;
    int dx[] = { 0, 1, 0, -1 };
    int dy[] = { -1, 0, 1, 0 };
    char* ds = "URDL";
    putchar(ds[dir]);
    while (!(x == 0 && y == 0)) {
        if (points[y][x][(dir+3)%4])
            dir = (dir+3)%4;
        else if (points[y][x][dir])
            ;
        else if (points[y][x][(dir+1)%4])
            dir = (dir+1)%4;
        else
            dir = (dir+2)%4;
 
        x += dx[dir];
        y += dy[dir];
        putchar(ds[dir]);
    }
    putchar('\n');
 
    return 0;
}