#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;
 
#define rep(i,n) for(int i=0;i<int(n);++i)
 
static const double PI=6*asin(0.5);
typedef complex<double> P;
typedef long long ll;

int m[10][10];
int p[10][10][10][10];
int vec=0;//right=0 down=1 left=2 up=3
int x=1,y=0;
int cou=0;

int pgo(int x,int y,int vec);

bool go_to(int x1,int y1,int x2,int y2){
	bool f;
    int a[]={x1,y1,x2,y2};
    rep(i,4){
        if(a[i]<0||a[i]>6) return false;
    }
    f= p[y1][x1][y2][x2]==1?true:false;
	if(f)
	//cout<<endl<<x1<<" "<<y1<<"  "<<x2<<" "<<y2<<endl;
	return f;
}
void dgo(int x,int y,int vec){
    cout<<"D";
	//cout<<"y="<<y<<endl;
	//vec=1;
	pgo(x,y+1,1);
}
void rgo(int x,int y,int vec){
    cout<<"R";
    //x++;
    //vec=0;
	pgo(x+1,y,0);
}
void lgo(int x,int y,int vec){
    cout<<"L";
    //x--;
    //vec=2;
	pgo(x-1,y,2);
}
void ugo(int x,int y,int vec){
    cout<<"U";
    //y--;
    //vec=3;
	pgo(x,y-1,3);
}

int pgo(int x,int y, int vec){
	cou++;
	//if(cou==30) return 0;
    if(x==1&&y==1&&cou!=1) return 0;
    else if(vec==0){
        if(go_to(x,y,x,y-1)) ugo(x,y,0);
        else if(go_to(x,y,x+1,y)) rgo(x,y,0);
        else if(go_to(x,y,x,y+1)) dgo(x,y,0);
        else if(go_to(x,y,x-1,y)) lgo(x,y,0);

    }
    else if(vec==1){
        if(go_to(x,y,x+1,y)) rgo(x,y,1);
        else if(go_to(x,y,x,y+1)) dgo(x,y,1);
        else if(go_to(x,y,x-1,y)) lgo(x,y,1);
        else if(go_to(x,y,x,y-1)) ugo(x,y,1);
    }
    else if(vec==2){
        if(go_to(x,y,x,y+1)) dgo(x,y,2);
        else if(go_to(x,y,x-1,y)) lgo(x,y,2);
        else if(go_to(x,y,x,y-1)) ugo(x,y,2);
        else if(go_to(x,y,x+1,y)) rgo(x,y,2);
    }
    else if(vec==3){
        if(go_to(x,y,x-1,y)) lgo(x,y,3);
        else if(go_to(x,y,x,y-1)) ugo(x,y,3);
        else if(go_to(x,y,x+1,y)) rgo(x,y,3);
        else if(go_to(x,y,x,y+1)) dgo(x,y,3);
    }
    //pgo(x,y,vec);
	return 0;
}

int main(){
    rep(a,10) rep(b,10) rep(c,10) rep(d,10) p[a][b][c][d]=0;
    rep(i,10) rep(j,10) m[i][j]=0;
    rep(i,4){
        char t;
    	string tm;
        int tmp;
        rep(j,4){
            cin>>t;
        	tm=t;
            if(tm=="0") tmp=0;
            else if(tm=="1") tmp=1;
        	//cout<<t<<" "<<tmp<<endl;
            p[i+1][j+1][i+1][j+2]=tmp;
            p[i+1][j+2][i+1][j+1]=tmp;
        		//cout<<tmp<<"  "<<j+1<<","<<i+1<<"-"<<j+2<<","<<i+1<<endl;
        }
        rep(j,5){
            cin>>t;
        	tm = t;
            if(tm=="0") tmp=0;
            else if(tm=="1") tmp=1;
            p[i+1][j+1][i+2][j+1]=tmp;
            p[i+2][j+1][i+1][j+1]=tmp;
        	
        		//cout<<tmp<<"  "<<j+1<<","<<i+1<<"-"<<j+2<<","<<i+1<<endl;
        }
    }
    rep(j,4){
        int i=4;
        char t;
        int tmp;
    	string tm;
        cin>>t;
    	tm = t;
        if(tm=="0") tmp=0;
        else if(tm=="1") tmp=1;
        p[i+1][j+1][i+1][j+2]=tmp;
        p[i+1][j+2][i+1][j+1]=tmp;
    	
        		//cout<<tmp<<"  "<<j+1<<","<<i+1<<"-"<<j+2<<","<<i+1<<endl;
    }
    
    pgo(1,1,0);
    cout<<endl;
    return 0;
}