#include <iostream>
using namespace std;

char w[10][8];

int dd[4][2] = {{0,1},{1,0},{0,-1},{-1,0}}, k;
char dr[8] = "RDLU";
int pos[2] = {0,1};

bool existWall(int i){
    int rem = (k+i+4)%4;
    if( pos[0] == 0 && rem == 3 ) return false;
    if( pos[1] == 0 && rem == 2 ) return false;
    if( rem%2 ){
        return w[2*pos[0]+2-rem][pos[1]] == '1';
    }else{
        return w[2*pos[0]][pos[1]-rem/2] == '1';
    }
}

int main(){
    for(int i = 0; i < 9; i++){
        cin >> w[i];
    }
    cout << 'R';
    k = 0;
    while( pos[0] != 0 || pos[1] != 0 ){
        for(int i = -1; i < 3; i++){
            if( existWall(i) ){
                k = (k+i+4)%4;
                break;
            }
        }
        pos[0] += dd[k][0];
        pos[1] += dd[k][1];
        cout << dr[k];
    }
    cout << endl;
    return 0;
}