// AOL q0037
// YAMADA Terushige
// 2013.4.12

#include<iostream>
 
using namespace std;
int grid[5][5][4];
 
int main(){
 
  enum Direc {L,U,R,D};
  string s;

  int i,j,k,d;
  for(i=0;i<4;i++){
    cin >> s;
    for(j=0;j<4;j++){
      grid[i][j][R]=grid[i][j+1][L]=s[j]-'0';
    }
    cin >> s;
    for(j=0;j<5;j++){
      grid[i][j][D]=grid[i+1][j][U]=s[j]-'0';
    }
  }
  cin >> s;
  for(j=0;j<4;j++){
    grid[i][j][R]=grid[i][j+1][L]=s[j]-'0';
  }

  i=0;j=1;
  d=R;cout <<'R';
  while(i!=0 || j!=0){
    d=(d+2)%4;
    for(k=0;k<4;k++){
      d=(d+1)%4;
      if(grid[i][j][d]==1)break;
    }

    switch(d){
    case L:
      cout << 'L';j--;
      break;
    case U:
      cout << 'U';i--;
      break;
    case R:
      cout << 'R';j++;
      break;
    case D:
      cout << 'D';i++;
      break;
    }

  }
  cout << endl;
}
