#include <iostream>
using namespace std;

string line[9];

bool check( int x, int y ) {
    if ( y < 0 || y >= 9 ) return false;
    if ( y % 2 == 0 ) {
        if ( x < 0 || x >= 4 ) return false;
    } else {
        if ( x < 0 || x >= 5 ) return false;
    }
    return true;
}

int cnt;
void solve( int a, int x, int y ) {
    if ( cnt >= 2 ) return;

    if ( x == 0 && y == 0 ) {
        cnt++;
    }

    if ( y % 2 == 0 ) {
        cout << ( a ? "R" : "L" );
    } else {
        cout << ( a ? "U" : "D" );
    }

    if ( y % 2 == 0 ) {
        if ( a ) {
            if ( check(x+1,y-1) && line[y-1][x+1] == '1' ) {
                solve( 1, x+1, y-1 );
            } else if ( check(x+1,y) && line[y][x+1] == '1' ) {
                solve( 1, x+1, y );
            } else if ( check(x+1,y+1) && line[y+1][x+1] == '1' ) {
                solve( 0, x+1, y+1 );
            }
        } else {
            if ( check(x,y-1) && line[y-1][x] == '1' ) {
                solve( 1, x, y-1 );
            } else if ( check(x-1,y) && line[y][x-1] == '1' ) {
                solve( 0, x-1, y );
            } else if ( check(x,y+1) && line[y+1][x] == '1' ) {
                solve( 0, x, y+1 );
            }
        }
    } else {
        if ( a ) {
            if ( check(x-1, y-1) && line[y-1][x-1] == '1' ) {
                solve( 0, x-1, y-1 );
            } else if ( check(x, y-2) && line[y-2][x] == '1' ) {
                solve( 1, x, y-2 );
            } else if ( check(x, y-1) && line[y-1][x] == '1' ) {
                solve( 0, x, y-1 );
            }
        } else {
            if ( check(x, y+1) && line[y+1][x] == '1' ) {
                solve( 1, x, y+1 );
            } else if ( check(x, y+2) && line[y+2][x] == '1' ) {
                solve( 0, x, y+2 );
            } else if ( check(x-1, y+1) && line[y+1][x-1] == '1' ) {
                solve( 0, x-1, y+1 );
            }
        }
    }
}

int main() {
    for ( int i = 0; i < 9; i++ ) {
        cin >> line[i];
    }

    cnt = 0;
    solve( 1, 0, 0 );
    cout << endl;

    return 0;
}