#include <cstdio>
#include <unistd.h>
#define U 0
#define R 1
#define D 2
#define L 3

int dx[] = {0,1,0,-1};
int dy[] = {-1,0,1,0};

using namespace std;

int wall[5][5];
char buf[128];
void readH(int y){
//  read(0,buf,6);buf[4]=0;
  scanf("%s",buf);
  for (int i=0; i<4; i++){
    wall[i][y] |= (buf[i]=='1') << R;
    wall[i+1][y] |= (buf[i]=='1') << L;
  }
}
void readV(int y){
  scanf("%s",buf);
  for (int i=0; i<5; i++){
    wall[i][y] |= (buf[i]=='1') << D;
    wall[i][y+1] |= (buf[i]=='1') << U;
  }
}
int main(void){
  int x,y,dir;
  
  for (int i=0; i<4; i++){
    readH(i); readV(i);
  }
  readH(4);
  
/*  for (int y=0; y<=4; y++){
    for (int x=0; x<=4; x++){
      printf("%x ", wall[x][y]);
    }puts("");
  }
  */
//  for(x=y=(dir=R)^R;x+=dx[dir],y+=dy[dir],write(1,&(*buf="URDL"[dir]),1),x+y;){
  for(x=y=(dir=R)^R;x+=dx[dir],y+=dy[dir],putchar("URDL"[dir]),x+y;){
    for((dir+=3)&=~4;!(wall[x][y]&(1<<dir)); (dir+=1)&=~4){
    }
  }
  return 0;
}
