#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int field[6][6]={0};
  for(int i=0; i<9; i++){
    if(i%2 == 0){
      for(int j=0,a; j<4; j++){
	scanf("%1d",&a);
	field[i/2][j+1]+=4*a;
	field[i/2+1][j+1]+=a;
      }
    }
    else{
      for(int j=0,a; j<5; j++){
	scanf("%1d",&a);
	field[i/2+1][j]+=2*a;
	field[i/2+1][j+1]+=8*a;
      }
    }
  }
  int x=0,y=1,d=2;
  for(;;){
    if(d == 1){
      if(!(field[x][y]&2)){d = 2;y++;}
      else if(field[x][y]&1){cout <<"U";d = 8;}
      else{cout <<"U";x--;}
    }
    else if(d == 2){
      if(!(field[x][y]&4)){d = 4;x++;}
      else if(field[x][y]&2){cout <<"R";d = 1;}
      else{cout <<"R";y++;}
    }
    else if(d == 4){
      if(!(field[x][y]&8)){d = 8;y--;}
      else if(field[x][y]&4){cout <<"D";d = 2;}
      else{cout <<"D";x++;}
    }
    else if(d == 8){
      if(!(field[x][y]&1)){d = 1;x--;}
      else if(field[x][y]&8){cout <<"L";d = 4;}
      else{cout <<"L";y--;}
    }
    if(x == 0 && y == 1 && d == 2) break;
  }
  return 0;
}