#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

string s[9], ans;
signed main(void)
{
  REP(i, 9) cin >> s[i];
  int x = 1, y = 0, dir = 0;
  while(true) {
    if(dir == 0) {
      //cout << s[2*y][x-1] << " " << s[2*y-1][x+1] << endl;
      if(x >= 1 && y >= 1 && s[2*y][x-1] == '1' && s[2*y-1][x] == '1') {
        dir = 3;
      } else if(x >= 1 && s[2*y][x-1] == '1' && s[2*y][x] == '1') {
        ++x;
      } else if(x >= 1 && s[2*y][x-1] == '1' && s[2*y+1][x] == '1') {
        ++x; ++y; dir = 1;
      } else if(x >= 1 && s[2*y][x-1] == '1') {
        ++y; dir = 2;
      }
      cout << 'R';
    } else if(dir == 1) {
      if(x >= 1 && y >= 1 && s[2*y-1][x-1] == '1' && s[2*y][x-1] == '1') {
        dir = 0;
      } else if(x >= 1 && y >= 1 && s[2*y-1][x-1] == '1' && s[2*y+1][x-1] == '1') {
        ++y;
      } else if(x >= 2 && y >= 1 && s[2*y-1][x-1] == '1' && s[2*y][x-2] == '1') {
        --x; ++y; dir = 2;
      } else if(x >= 1 && y >= 1 && s[2*y-1][x-1] == '1') {
        --x; dir = 3;
      }
      cout << 'D';
    } else if(dir == 2) {
      if(x >= 1 && y >= 1 && s[2*y-2][x-1] == '1' && s[2*y-1][x-1] == '1') {
        dir = 1;
      } else if(x >= 2 && y >= 1 && s[2*y-2][x-1] == '1' && s[2*y-2][x-2] == '1') {
        --x;
      } else if(x >= 1 && y >= 1 && s[2*y-2][x-1] == '1' && s[2*y-3][x-1] == '1') {
        --x; --y; dir = 3;
      } else if(x >= 1 && y >= 1 && s[2*y-2][x-1]) {
        --y; dir = 0;
      }
      cout << 'L';
    } else if(dir == 3) {
      if(x >= 1 && y >= 1 && s[2*y-1][x] == '1' && s[2*y-2][x-1] == '1') {
        dir = 2;
      } else if(y >= 2 && s[2*y-1][x] == '1' && s[2*y-3][x] == '1') {
        y--;
      } else if(y >= 1 && s[2*y-1][x] == '1' && s[2*y-2][x] == '1') {
        ++x; --y; dir = 0;
      } else if(y >= 1 && s[2*y-1][x] == '1') {
        ++x; dir = 2;
      }
      cout << 'U';
    }
    //cout << x << " " << y << " " << dir << endl;
    if((x == 1 && y == 0) || (x == 1 && y == 1) || (x == 0 && y == 1)) {
      if(dir == 0) cout << 'R';
      else if(dir == 1) cout << 'D';
      else if(dir == 2) cout << 'L';
      else if(dir == 3) cout << 'U';
      cout << endl;
      return 0;
    }
  }

  return 0;
}