#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>
 
#define f first
#define s second
#define mp make_pair
 
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;
 
typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;
 
int kabe[5][5][5][5];
 
enum direct {
  RIGHT = 0,
  DOWN  = 1,
  LEFT  = 2,
  UP    = 3
};
 
const char *dstr = "RDLU";
 
const int dx[4] = { 1, 0,-1, 0};
const int dy[4] = { 0, 1, 0,-1};
 
#define D(d) (((d)+4)%4)
 
bool go(int x1, int y1, int x2, int y2){
  if(x2 < 0 || y2 < 0 || x2 >= 5 || y2 >= 5) return false;
  return kabe[x1][y1][x2][y2] == 1;
}
 
int main(){
  string str;
  REP(i,9){
    cin>>str;
    if(i%2 == 0){
      REP(j,4){
    int x = j;
    int y = i/2;
    if(str[j] == '1'){
      kabe[x][y][x+1][y] = kabe[x+1][y][x][y] = 1;
    }
      }
    }else{
      REP(j,5){
    int x = j;
    int y = i/2;
    if(str[j] == '1'){
      kabe[x][y][x][y+1] = kabe[x][y+1][x][y] = 1;
    }
      }
    }
  }
  int x = 0, y = 0;
  int d = RIGHT;
  while(x != 0 || y != 0 || d == RIGHT){
    d = D(d-1);
    while(!go(x,y,x+dx[d],y+dy[d])) d = D(d+1);
    putchar(dstr[d]);
    x += dx[d]; y += dy[d];
  }
  puts("");
  return 0;
}