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