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

typedef vector <string> VS;

VS R;
string D = "RDLU";
const int RIGHT = 0;
const int DOWN = 1;
const int LEFT = 2;
const int UP = 3;
int cnt[100][100];

void dfs( int dir, int x, int y, int a ) {
    // cout << dir << ", " << x << ", " << y << endl;
    cout << D[dir];
    cnt[y][x]++;
    if ( x == 0 && y == 0 && cnt[y][x] > 1 ) return;

    if ( dir == RIGHT ) {
        // 0:ue, 1:sita
        if ( a == 0 ) {
            if ( y-1 >= 0 && x+1 < R[y-1].size() && R[y-1][x+1] == '1' ) {
                return dfs( UP, x+1, y-1, 0 );
            }
            if ( x+1 < R[y].size() && R[y][x+1] == '1' ) {
                return dfs( RIGHT, x+1, y, 0 );
            }
            if ( y+1 < R.size() && x+1 < R[y+1].size() && R[y+1][x+1] == '1' ) {
                return dfs( DOWN, x+1, y+1, 1 );
            }
        } else {
            if ( y+1 < R.size() && x+1 < R[y+1].size() && R[y+1][x+1] == '1' ) {
                return dfs( DOWN, x+1, y+1, 0 );
            }
            if ( x+1 < R[y].size() && R[y][x+1] == '1' ) {
                return dfs( RIGHT, x+1, y, 1 );
            }
            if ( y-1 >= 0 && x+1 < R[y-1].size() && R[y-1][x+1] == '1' ) {
                return dfs( UP, x+1, y-1, 1 );
            }
        }
    } else if ( dir == DOWN ) {
        // 0:hidari, 1:migi
        if ( a == 0 ) {
            if ( y+1 < R.size() && x-1 >= 0 && R[y+1][x-1] == '1' ) {
                return dfs( LEFT, x-1, y+1, 0 );
            }
            if ( y+2 < R.size() && R[y+2][x] == '1' ) {
                return dfs( DOWN, x, y+2, 0 );
            }
            if ( y+1 < R.size() && x < R[y+1].size() && R[y+1][x] == '1' ) {
                return dfs( RIGHT, x, y+1, 1 );
            }
        } else {
            if ( y+1 < R.size() && x < R[y+1].size() && R[y+1][x] == '1' ) {
                return dfs( RIGHT, x, y+1, 0 );
            }
            if ( y+2 < R.size() && R[y+2][x] == '1' ) {
                return dfs( DOWN, x, y+2, 1 );
            }
            if ( y+1 < R.size() && x-1 >= 0 && R[y+1][x-1] == '1' ) {
                return dfs( LEFT, x-1, y+1, 1 );
            }
        }
    } else if ( dir == LEFT ) {
        // 0:ue, 1:sita
        if ( a == 0 ) {
            if ( y-1 >= 0 && x < R[y-1].size() && R[y-1][x] == '1' ) {
                return dfs( UP, x, y-1, 1 );
            }
            if ( x-1 >= 0 && R[y][x-1] == '1' ) {
                return dfs( LEFT, x-1, y, 0 );
            }
            if ( y+1 < R.size()&& x < R[y+1].size() && R[y+1][x] == '1' ) {
                return dfs( DOWN, x, y+1, 0 );
            }
        } else {
            if ( y+1 < R.size()&& x < R[y+1].size() && R[y+1][x] == '1' ) {
                return dfs( DOWN, x, y+1, 1 );
            }
            if ( x-1 >= 0 && R[y][x-1] == '1' ) {
                return dfs( LEFT, x-1, y, 1 );
            }
            if ( y-1 >= 0 && x < R[y-1].size() && R[y-1][x] == '1' ) {
                return dfs( UP, x, y-1, 0 );
            }
        }
    } else if ( dir == UP ) {
        // 0:hidari, 1:migi
        if ( a == 0 ) {
            if ( y-1 >= 0 && x-1 >= 0 && R[y-1][x-1] == '1' ) {
                return dfs( LEFT, x-1, y-1, 1 );
            }
            if ( y-2 >= 0 && R[y-2][x] == '1' ) {
                return dfs( UP, x, y-2, 0 );
            }
            if ( y-1 >= 0 && x < R[y-1].size() && R[y-1][x] == '1' ) {
                return dfs( RIGHT, x, y-1, 0 );
            }
        } else {
            if ( y-1 >= 0 && x < R[y-1].size() && R[y-1][x] == '1' ) {
                return dfs( RIGHT, x, y-1, 1 );
            }
            if ( y-2 >= 0 && R[y-2][x] == '1' ) {
                return dfs( UP, x, y-2, 1 );
            }
            if ( y-1 >= 0 && x-1 >= 0 && R[y-1][x-1] == '1' ) {
                return dfs( LEFT, x-1, y-1, 0 );
            }
        }
    }
}

int main() {
    for ( int i = 0; i < 100; i++ ) {
        for ( int j = 0; j < 100; j++ ) {
            cnt[i][j] = 0;
        }
    }
    R = VS( 9 );
    for ( int i = 0; i < 9; i++ ) {
        cin >> R[i];
    }
    dfs( 0, 0, 0, 0 );
    cout << endl;
    return 0;
}