#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()

int main(){
  bool w[5][5][4]={};
  char a;
  rep(i,5){
    rep(j,4){
      cin>>a;
      w[i][j][0]=a-'0';
      w[i][j+1][2]=a-'0';
    }
    if(i==4)continue;
    rep(j,5){
      cin>>a;
      w[i][j][1]=a-'0';
      w[i+1][j][3]=a-'0';
    }
  }
  assert(w[0][0][0]);
  int py=0,px=0;
  int dir=0;
  int dx[]={1,0,-1,0};
  int dy[]={0,1,0,-1};
  string ans="";
  string ch[]={"R","D","L","U"};
  do{
    for(int i=-1;i<=2;i++){
      int nd=(dir+i+4)%4;
      if(w[py][px][nd]){
        ans+=ch[nd];
        py+=dy[nd];
        px+=dx[nd];
        dir=nd;
        break;
      }
    }
  }while(py!=0||px!=0);
  cout<<ans<<endl;
}

