#include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

int maze[20][20];

char s[6];
char ans[100];
int sz=0;

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

char sym[]="RDLU";

int main(){
  REP(i,9){
    scanf("%s",s);
    REP(j,strlen(s)){
      if (i%2==0){
	maze[i+1][2*j+2]=s[j]-'0';
      }else{
	maze[i+1][2*j+1]=s[j]-'0';
      }
    }
  }
  REP(i,11){
    REP(j,11){
      fprintf(stderr,"%d",maze[i][j]);
    }
    fprintf(stderr,"\n");
  }
  ans[0]='R';
  sz++;
  int x=3,y=1;
  int dir=0;
  while (x!=1 || y!=1){
    REP(i,4){
      int d=(dir+3+i)%4;
      if (maze[y+dy[d]][x+dx[d]]){
	dir=d;
	break;
      }
    }
    x+=dx[dir]*2;
    y+=dy[dir]*2;
    ans[sz++]=sym[dir];
  }
  printf("%s\n",ans);
  return 0;
}