#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cctype>
#include <numeric>
#include <cassert>
using namespace std;

#define rep(i,n) for(int (i)=0; (i)<(int)(n); ++(i))
#define foreach(c,i) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)

char ver[10][10], hol[10][10];
const int dx[] = {-1,0,1,0};
const int dy[] = {0,1,0,-1};
const char dir[] = {'U','R','D','L'};

void input() {
  scanf("%s", hol[1]+1);
  rep(i,4) {
    scanf("%s", ver[i+1]+1);
    scanf("%s", hol[i+2]+1);
  }
  rep(i,8) rep(j,8) {
    if (hol[i][j] == '1') hol[i][j] = 1;
    else hol[i][j] = 0;
    if (ver[i][j] == '1') ver[i][j] = 1;
    else ver[i][j] = 0;
  }
  // rep(i,8) {
  //   putchar(' ');
  //   rep(j,8) printf("%2d", hol[i][j]); puts("");
  //   rep(j,8) printf("%2d", ver[i][j]); puts("");
  // }
}

bool is_end(int x, int y, int d) {
  return (x == 0 && y == 1 && d == 0) ||
      (x == 1 && y == 1 && d == 3);
}

void update(int &x, int &y, int &d) {
  const int bx = x, by = y, bd = d;
  switch (d) {
    case 0: {
      if (hol[y][x]) d = 3;
      else if (ver[y-1][x+1]) --y;
      else if (hol[y][x+1]) { ++x; --y; d = 1; }
      break;
    }
    case 1: {
      if (ver[y][x+1]) d = 0;
      else if (hol[y+1][x+1]) ++x;
      else if (ver[y+1][x+1]) { ++x; ++y; d = 2; }
      break;
    }
    case 2: {
      if (hol[y+1][x]) d = 1;
      else if (ver[y+1][x]) ++y;
      else if (hol[y+1][x-1]) { --x; ++y; d = 3; }
      break;
    }
    case 3: {
      if (ver[y][x]) d = 2;
      else if (hol[y][x-1]) --x;
      else if (ver[y-1][x]) { --x; --y; d = 0; }
      break;
    }
  }
  if (bx == x && by == y && bd == d) {
    printf("%d %d %d\n", x, y, d);
    assert(false);
  }
}

void solve() {
  int x = 1, y = 0, d = 1;
  string ans = "R";
  do {
    // printf("%d,%d - %d : %s\n", x, y, d, ans.c_str());
    update(x, y, d);
    ans += dir[d];
  } while (!is_end(x,y,d));
  printf("%s\n", ans.c_str());
}

int main() {
  input();
  solve();
  return 0;
}