#include <iostream>
using namespace std;

int main() {
  char c;
  bool a[10][5];
  bool b[5][5][4];
  char label[4] = {'R', 'D', 'L', 'U'};
  int dx[] = {0, 1, 0, -1};
  int dy[] = {1, 0, -1, 0}; 
  int x, y, d, nd;

  for (int i=0; i<9; i++) {
    int r = (i%2) ? 5 : 4;
    for (int j=0; j<r; j++) {
      cin >> c;
      a[i][j] = c - '0';
    }
  }

  for (int i=0; i<5; i++) {
    for (int j=0; j<5; j++) {
      b[i][j][0] = (j<4) ? a[2*i][j] : false;
      b[i][j][1] = (i<4) ? a[2*i+1][j] : false;
      b[i][j][2] = (j) ? a[2*i][j-1] : false;
      b[i][j][3] = (i) ? a[2*i-1][j] : false;
    }
  }

  d = 0;
  cout << label[d];
  x = 0; y = 1;
  do {
    for (int i=0; i<4; i++) {
      nd = (d+i+3)%4;
      if (b[x][y][nd]) {
        d = nd;
        break;
      }
    }
    cout << label[d];
    x += dx[d]; y+= dy[d];
  } while (x || y);
  cout << endl;

  return 0;
}