#include <iostream>
#include <vector>

using namespace std;
const int X = 1000;
const int Y = 10;
bool g[Y][X][Y][X];

struct State {
    int x;
    int y;
    int dir;
};
int dirx[] = {1, 0, -1, 0};
int diry[] = {0, 1, 0, -1};
string ans = "";

vector<int> inputLine() {
    string s;
    vector<int> a;
    cin >> s;
    for(char c : s) {
        a.push_back(c - '0');
    }
    return a;
}

string toString(int dir) {
    switch(dir) {
    case 0:
        return "R";
    case 1:
        return "D";
    case 2:
        return "L";
    case 3:
        return "U";
    }
}

struct State at(struct State st) {
    for(int i=0;i<4;i++) {
        int ndir = (st.dir + i) % 4;
        int nx = st.x + dirx[ndir];
        int ny = st.y + diry[ndir];
        if(0 <= nx && 0 <= ny && g[st.y][st.x][ny][nx]) {
            // printf("nx: %d, ny: %d, ndir: %d\n", nx, ny, ndir);
            ans += toString(ndir);
            int nndir = (ndir+3)%4;
            int nnx = nx + dirx[nndir];
            int nny = ny + diry[nndir];
            if(0 <= nnx && 0 <= nny && g[ny][nx][nny][nnx]) {
                // print("dirx: %d, diry: %d\n", dirx[ndir
                // printf("nnx: %d, nny: %d, nndir: %d\n", nnx, nny, nndir);
                return (State){nx, ny, nndir};
            }else {
                return (State){nx, ny, ndir};
            }
        }
    }
}

int main() {
    vector<vector<int>> a;
    for(int i=0;i<9;i++) {
        a.push_back(inputLine());
    }
    for(int i=0;i<Y;i++) {
        for(int j=0;j<X;j++) {
            for(int k=0;i<Y;i++) {
                for(int l=0;j<X;j++) {
                    g[i][j][k][l] = false;
                }
            }
        }
    }
    for(int i=0;i<4;i++) {
        for(int j=0;j<a[0].size();j++) {
            if(a[2*i][j] == 1) {
                g[i][j][i][j+1] = true;
                g[i][j+1][i][j] = true;
            }
        }
        for(int j=0;j<a[1].size();j++) {
            if(a[2*i+1][j] == 1) {
                g[i][j][i+1][j] = true;
                g[i+1][j][i][j] = true;
            }
        }
    }
    for(int j=0;j<a[0].size();j++) {
        if(a[8][j] == 1) {
            g[4][j][4][j+1] = true;
            g[4][j+1][4][j] = true;
        }
    }
    auto st = at((State){0, 0, 0});
    while(st.x != 0 || st.y != 0) {
        // printf("x: %d, y: %d, dir: %d\n", st.x, st.y, st.dir);
        st = at(st);
        // cout << st.dir << endl;
    }
    // printf("x: %d, y: %d, dir: %d\n", st.x, st.y, st.dir);
    cout << ans << endl;
}