#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};

vector<pair<int, int>> G[55];

int main() {

  while(1) {
    rep(i, 5) {
      char x;
      rep(j, 4) {
        cin >> x; if(cin.eof()) return 0;
        if(x-'0') {
          G[i * 5 + j].emplace_back(i * 5 + j + 1, 2);
          G[i * 5 + j + 1].emplace_back(i * 5 + j, 0);
        }
      }

      if(i == 4) break;

      rep(j, 5) {
        cin >> x;
        if(x-'0') {
          G[i * 5 + j].emplace_back((i + 1) * 5 + j, 3);
          G[(i + 1) * 5 + j].emplace_back(i * 5 + j, 1);
        }
      }
    }

    string const OP = "LURD";

    int y = 0, x = 0, d = 2;

    while(y != 0 || x != 0 || d != 0) {
      bool ok = 0; int le = -1, ri = -1;
      for(auto && e: G[y * 5 + x]) {
        if(e.second == (d + 3) % 4) le = e.second;
        if(e.second == (d + 1) % 4) ri = e.second;
        if(e.second != d) continue;
        ok = 1;
        y = e.first / 5, x = e.first % 5;
        cout << OP[d];
        break;
      }
      if(!ok) {
        if(le != -1) d = le;
        else if(ri != -1) d = ri;
        else (d += 1) %= 4;
      }
    }
    cout << endl;
  }
    
  return 0;
}