#include <iostream>
#include <string>
#include <cstring>
using namespace std;

int map[10][5];
bool used[10][5];

bool f = true;
string S = "LURD";
void dfs( int r, int c, int a, int o )
{
    used[r][c] = true;
    if ( o ) {
        cout << S[a];
    }

    if ( !f && r == 0 && c == 0 ) {
        cout << endl;
        return;
    }

    if ( f ) {
        if ( a == 0 ) {
            if ( c == 0 || !map[r][c-1] ) {
                if ( !used[r][c-1] ) {
                    dfs( r-1, c, 1, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            } else if ( map[r][c-1] ) {
                if ( !used[r][c-1] ) {
                    dfs( r, c-1, 0, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            }
        } else if ( a == 1 ) {
            if ( r == 1 || !map[r-2][c] ) {
                if ( !used[r-1][c] ) {
                    dfs( r-1, c, 2, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            } else if ( map[r-2][c] ) {
                if ( !used[r-2][c] ) {
                    dfs( r-2, c, 1, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            }
        } else if ( a == 2 ) {
            if ( c == 3 || !map[r][c+1] ) {
                if ( !used[r+1][c+1] ) {
                    dfs( r+1, c+1, 3, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            } else if ( map[r][c+1] ) {
                if ( !used[r][c+1] ) {
                    dfs( r, c+1, 2, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            }
        } else if ( a == 3 ) {
            if ( c == 7 || !map[r+2][c] ) {
                if ( !used[r+1][c-1] ) {
                    dfs( r+1, c-1, 0, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            } else if ( map[r+2][c] ) {
                if ( !used[r+2][c] ) {
                    dfs( r+2, c, 3, 1 );
                } else {
                    f = false;
                    dfs( r, c, a, 0 );
                }
            }
        }
    } else {
        if ( a == 0 ) {
            if ( c == 0 || !map[r][c-1] ) {
                dfs( r+1, c, 3, 1 );
            } else if ( map[r][c-1] ) {
                dfs( r, c-1, 0, 1 );
            }
        } else if ( a == 1 ) {
            if ( r == 1 || !map[r-2][c] ) {
                dfs( r-1, c-1, 0, 1 );
            } else if ( map[r-2][c] ) {
                dfs( r-2, c, 1, 1 );
            }
        } else if ( a == 2 ) {
            if ( c == 3 || !map[r][c+1] ) {
                dfs( r-1, c+1, 1, 1 );
            } else if ( map[r][c+1] ) {
                dfs( r, c+1, 2, 1 );
            }
        } else if ( a == 3 ) {
            if ( r == 7 || !map[r+2][c] ) {
                dfs( r+1, c, 2, 1 );
            } else if ( map[r+2][c] ) {
                dfs( r+2, c, 3, 1 );
            }
        }
    }
}

int main( void )
{
    for ( int i = 0; i < 9; i++ ) {
        string line;
        cin >> line;
        for ( int j = 0; j < (i%2==0?4:5); j++ ) {
            map[i][j] = (int)(line[j] - '0');
        }
    }

    dfs( 0, 0, 2, 1 );

    return 0;
}