
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<(n);i++)
#define loop(i,a,n) for(i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int g[6][6][4]={};//top,bottom,left,right

int main(void) {
  int i,j;
  rep(i,9){
    string s;
    cin>>s;
    if(i%2){
      rep(j,5){
        g[i/2+1][j][3] = s[j] - '0';
        g[i/2+1][1+j][2] = g[i/2+1][j][3];
      }
    }else{
      rep(j,4){
        g[i/2+1][1+j][0] = s[j] - '0';
        g[i/2][1+j][1] = g[i/2+1][1+j][0];
      }
    }
  }

  char s[5] = {"LRDU"};
  int dx[4] = {0,0,1,-1};
  int dy[4] = {-1,1,0,0};

  int x=0,y=1,z=1;//(x,y)右手がz

  while(x+y){
    if(g[x][y][z]){
        cout<<s[z];
        if((z==1 && g[x][y][1] && g[x][y][3]) || (z==0 && g[x][y][0] && g[x][y][2]) ||
          (z==2 && g[x][y][2] && g[x][y][1]) || (z==3 && g[x][y][3] && g[x][y][0])){
            switch(z){
              case 0: z=2;break;
              case 1: z=3;break;
              case 2: z=1;break;
              case 3: z=0;break;
            }
        }else{
          x = x + dx[z];
          y = y + dy[z];
        }
    }else{
      switch(z){
        case 0: z=3;x--;break;
        case 1: z=2;x++;break;
        case 2: z=0;y--;break;
        case 3: z=1;y++;break;
      }
    }
  }
    cout<<endl;
}

