#include <bits/stdc++.h>
using namespace std;

int node(int y, int x) {
  return 5 * y + x;
}

int to(int dy, int dx, int now) {
  int y = now / 5 + dy, x = now % 5 + dx;
  return node(y, x);
}

bool inside(int now) {
  int y = now / 5, x = now % 5;
  return 0 <= node(y, x) && node(y, x) < 25;
}

bool g[25][25];

int main() {
  // input
  for (int i = 0; i < 9; ++i) {
    if (i & 1) {
      for (int j = 0; j < 5; ++j) {
        int f;
        scanf("%1d", &f);
        g[node(i / 2, j)][node(i / 2 + 1, j)] = f;
        g[node(i / 2 + 1, j)][node(i / 2, j)] = f;
      }
    } else {
      for (int j = 0; j < 4; ++j) {
        int f;
        scanf("%1d", &f);
        g[node(i / 2, j)][node(i / 2, j + 1)] = f;
        g[node(i / 2, j + 1)][node(i / 2, j)] = f;
      }
    }
  }

  int dx[] = {0, 1, 0, -1}, dy[] = {-1, 0, 1, 0};
  char d[] = {'U', 'R', 'D', 'L'};

  int now = node(0, 1);
  int direction = 1;
  string ans = "R";

  while (now) {
    direction = (direction + 3) % 4;
    for (int i = 0; i < 4; ++i) {
      int dir = (direction + i) % 4;
      int next = to(dy[dir], dx[dir], now);
      if (!inside(next) || !g[now][next]) continue;

      now = next;
      direction = dir;
      ans += d[dir];
      break;
    }
  }

  cout << ans << endl;
}