#include<bits/stdc++.h>
using namespace std;
string side[4],Longitudinal[5];
void serch(int x,int y,int then)
{
    if(then==0){
        if(x+1<5&&Longitudinal[y][x]=='1'){
            cout<<"R";
            serch(x+1,y,0);
        }
        else if(y-1>-1&&side[y-1][x]=='1'){
            cout<<"U";
            serch(x,y-1,3);
        }
        else if(y+1<5&&side[y][x]=='1'){
            cout<<"D";
            serch(x,y+1,1);
        }
    }
    else if(then==1){
        if(y+1<5&&side[y][x]=='1'){
            cout<<"D";
            serch(x,y+1,1);
        }
        else if(x+1<5&&Longitudinal[y][x]=='1'){
            cout<<"R";
            serch(x+1,y,0);
        }
        else if(x-1>-1&&Longitudinal[y][x-1]=='1'){
            cout<<"L";
            serch(x-1,y,2);
        }
    }
    else if(then==2){
        if(x-1>-1&&Longitudinal[y][x-1]=='1'){
        cout<<"L";
        serch(x-1,y,2);
        }
        else if(y+1<5&&side[y][x]=='1'){
            cout<<"D";
            serch(x,y+1,1);
        }
        else if(y-1>-1&&side[y-1][x]=='1'){
            cout<<"U";
            serch(x,y-1,3);
        }
    }
    else{
        if(y-1>-1&&side[y-1][x]=='1'){
            cout<<"U";
            serch(x,y-1,3);
        }
        else if(x-1>-1&&Longitudinal[y][x-1]=='1'){
            cout<<"L";
            serch(x-1,y,2);
        }
        else if(x+1<5&&Longitudinal[y][x]=='1'){
            cout<<"R";
            serch(x+1,y,0);
        }
    }
}
int main()
{
    for(int i=0;i<4;i++)cin>>Longitudinal[i]>>side[i];
    cin>>Longitudinal[4];
    serch(0,0,0);
    cout<<endl;
}