#include <iostream>
#include <string>

using namespace std;

int main(int argc, char *argv[]) {
  int vwall[5][6] = {0}, hwall[5][6] = {0};
  string tmp;
  for (int i = 0; i < 9; i++) {
    cin >> tmp;
    if (i % 2 == 0)
      for (int j = 0; j < 4; j++)
        hwall[i/2][j+1] = tmp[j]-'0';
    else
      for (int j = 0; j < 5; j++)
        vwall[j][i/2+1] = tmp[j]-'0';
  }

  string str = "";
  enum Compass {N = 0, E, W, S};
  enum Compass compass = E;
  int x = 0, y = 0;
  while (true) {
    if (compass == E)
      if (vwall[x][y]) {
        compass = N;
        str += 'U';
        y--;
      } else if (hwall[y][x+1]) {
        x++;
        str += 'R';
      } else if (vwall[x][y+1]) {
        compass = S;
        str += 'D';
        y++;
      } else {
        compass = W;
      }
    else if (compass == W)
      if (vwall[x][y+1]) {
        compass = S;
        str += 'D';
        y++;
      } else if (hwall[y][x]) {
        x--;
        str += 'L';
      } else if (vwall[x][y]) {
        compass = N;
        str += 'U';
        y--;
      } else {
        compass = E;
      }
    else if (compass == N)
      if (hwall[y][x]) {
        compass = W;
        str += 'L';
        x--;
      } else if (vwall[x][y]) {
        y--;
        str += 'U';
      } else if (hwall[y][x+1]) {
        compass = E;
        str += 'R';
        x++;
      } else {
        compass = S;
      }
    else if (compass == S)
      if (hwall[y][x+1]) {
        compass = E;
        str += 'R';
        x++;
      } else if (vwall[x][y+1]) {
        y++;
        str += 'D';
      } else if (hwall[y][x]) {
        compass = W;
        str += 'L';
        x--;
      } else {
        compass = N;
      }
    if (x == 0 && y == 0) {
      cout << str << endl;
      break;
    }
  }
  return 0;
}