#include <iostream>
#include <cstdio>
#include <string>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <ctime>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

namespace std {
    bool operator<(const P a, const P b) {
        return a.X != b.X ? a.X < b.X : a.Y < b.Y;
    }
}

#define S 6
// right, down, left, up
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};

int const MOD = 1000000007;

int main() {
    bool board[S][S][4] = {};
    // rep(i,0,S) board[i][S-1][0] = true; // right
    // rep(i,0,S) board[S-1][i][1] = true; // down
    // rep(i,0,S) board[i][0][2]   = true; // left
    // rep(i,0,S) board[0][i][3]   = true; // up

    rep(i,0,9) {
        int l, n;
        if(i % 2 == 0) l = 4;
        else l = 5;
        rep(j,0,l) {
            scanf("%1d", &n);
            if(n == 1) {
                if(i % 2 == 0) {
                    board[i/2][j+1][1] = true;
                    board[i/2+1][j+1][3] = true;
                }
                else {
                    board[i/2+1][j][0] = true;
                    board[i/2+1][j+1][2] = true;
                }
            }
        }
    }

    string d = "RDLU";
    string ret;
    int dir = 0;
    int nx = 0, ny = 1;
    int cas = 1;
    while(1) {
        int x, y;
        // printf("test: board[%d][%d][%d] = %d\n", nx, ny, (dir+1)%4, board[nx][ny][(dir+1)%4] ? 1 : 0);
        x = nx + dx[dir], y = ny + dy[dir];
        if(board[nx][ny][(dir + 1) % 4] == 0) {
            // printf("case 1: (%d, %d)\n", nx, ny);
            dir = (dir + 1) % 4;
            nx = nx + dx[dir], ny = ny + dy[dir];
            // ret += d[dir];
            continue;
        }
        if(board[nx][ny][dir] == 1) {
            // printf("case 2: (%d, %d)\n", nx, ny);
            if(cas == 1) ret += d[dir];
            dir = (dir - 1 + 4) % 4;
            ret += d[dir];
            cas = 2;
            continue;
        }
        ret += d[dir];
        nx = x, ny = y;
        if(nx == 1 && ny == 1 && dir == 2) break;
        if(nx == 1 && ny == 0 && dir == 3) break;
    }
    // printf("endx: %d, endy: %d, dir = %d\n", nx, ny, dir);
    cout << ret << endl;
    return 0;
}