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