#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int H = 5;
const int W = 5;
const int D = 4;
const string DIR = "RULD";

int v[H][W][D], my[4] = {0, -1, 0, 1}, mx[4] = {1, 0, -1, 0}, d = 0, y = 0, x = 1;

int main() {
  REP(i, 9){
    string s; cin >>s;
    if(i % 2) REP(j, s.length()) if(s[j] == '1') v[(i + 1) / 2 - 1][j][3] = v[(i + 1) / 2][j][1] = true;
    if(!(i % 2)) REP(j, s.length()) if(s[j] == '1') v[i / 2][j][0] = v[i / 2][j + 1][2] = true;
  }
  stringstream ss; ss << 'R';
  while(y != 0 || x != 0){
    if(v[y][x][(d + 1) % 4]){
      d = (d + 1) % 4; y += my[d]; x += mx[d];
      ss << DIR[d];
    } else if (v[y][x][d]){
      y += my[d]; x += mx[d];
      ss << DIR[d];
    } else{
      d = (d + 3) % 4;
    }
  }
  cout <<ss.str() <<endl;
  return 0;
}