#include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int a[9][9][4],x,y,dir=1;
int dx[]={0,1,0,-1};
int dy[]={-1,0,1,0};
string s="URDL";
int main(){
  r(i,9){
    if(i%2){
      r(j,5){
        scanf("%1d",&x);
        if(x)a[i/2][j][2]=a[i/2+1][j][0]=1;
      }
    }else{
      r(j,4){
        scanf("%1d",&x);
        if(x)a[i/2][j][1]=a[i/2][j+1][3]=1;
      }
    }
  }x=1;
  while(!(!x&&!y)){
    cout<<s[dir];
    if(a[y][x][(dir+3)%4])dir=(dir+3)%4;
    else if(a[y][x][dir]);
    else if(a[y][x][(dir+1)%4])dir=(dir+1)%4;
    else dir=(dir+2)%4;
    x+=dx[dir];
    y+=dy[dir];
  }
  cout<<endl;
}