#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
const int INF = 1e9+7;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repab(i,a,b) for(auto i=a;i<(b);i++)
#define rep(i,b) for(auto i=0;i<(b);i++)
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  const int north = 0;
  const int east  = 1;
  const int south = 2;
  const int west  = 3;
  const vi xwall = { 0,  1, 0,  0};
  const vi ywall = {-2, -1, 0, -1};
  const vi xmove = { 0,  1, 0, -1};
  const vi ymove = {-2,  0, 2,  0};
  const vector<char> movec = {'U', 'R', 'D', 'L'};
  const int mg = 2;
  int fsz = 10;
  int x, y;
  vvi field(fsz+2*mg, vi(fsz+2*mg, 0));

  x = y = mg;
  for (;;) {
    char c;
    cin.get(c);
    if (cin.eof())
      break;
    if (c == '\n') {
      x = mg;
      y++;
      continue;
    }
    field[x][y] = c-'0';
    x++;
  }


  int step = 0;
  int direction = east;
  x = y = mg;
  do {
    int r = (direction + 1)%4;
    do {
      if (!field[x+xwall[r]][y+ywall[r]]) {
        break;
      }
      r = (r+3)%4;
    } while (r != (direction+1)%4);
    cout << movec[r];
    direction = r;
    x = x + xmove[r];
    y = y + ymove[r];
  } while (x != mg || y != mg);
  cout << endl;

  return 0;
}