#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int points[5][5];
int dir[4] = {1,2,4,8};
char dirc[4] = {'R','D','L','U'};
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};
// [0,1,2,3] : [right,bottom,left,top]

int main(){
  REP(i,9){
    int x;
    cin>>x;
    if(i%2==0){
      // yokonaga
      REP(_j,4){
        int j = 3-_j;
        int val = x%10;
        x/=10;
        if(val==1){
          points[j][i/2] |= dir[0];
          points[j+1][i/2] |= dir[2];
        }
      }
    }else{
      // tatenaga
      REP(_j,5){
        int j = 4-_j;
        int val = x%10;
        x/=10;
        if(val==1){
          points[j][i/2] |= dir[1];
          points[j][i/2+1] |= dir[3];
        }
      }
    }
  }
  // input end
  int x=0, y=0, d=0;
  string res = "";
  while(!(x==0 && y==0) || res.size()==0){
    int kabe = (d+3)%4;
    if(points[x][y] & dir[kabe]) d = kabe;
    while(!(points[x][y] & dir[d])) d = (d+1)%4;
    res += dirc[d];
    x += dx[d];
    y += dy[d];
  }
  cout<<res<<endl;
  return 0;
}