#include<iostream>
#include<algorithm>
using namespace std;

const int N = 5;
const int di[] = {0,1,0,-1};
const int dj[] = {1,0,-1,0};
const char C[] = {'R','D','L','U'};
int g[N][N];
int main(void){
  fill(g[0],g[N],0);
  for(int s = 0 ; s < 2 * N - 1 ; s ++){
    for(int j = 0 ; j < N - 1 + s % 2 ; j ++){
      int i = s / 2;
      char a;
      cin>> a;
      if(a=='1'){
	if(s%2==0){
	  g[i][j] |= (1<<0);
	  g[i][j+1] |= (1<<2);
	} else{
	  g[i][j] |= (1<<1);
	  g[i+1][j] |= (1<<3); 
	}
      }
    }
  }

  int i,j,d;
  i = j = d = 0;
  do{
    for(int k = 0 ; k < 4 ; k ++){
      int nd = (d+3+k) % 4;
      if(g[i][j] & (1<<nd)){
	d = nd;
	i += di[d];
	j += dj[d];
	cout << C[d];
	break;
      }
    }
  }while(!(i==0 && j==0));
  cout<<endl;
  
}