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