#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

const static int SIZE = 11;
const static int H_LEN = 4;
const static int V_LEN = 5;
int main() {
  int field [ SIZE  ][ SIZE ] = { 0 };
  for( int i = 0; i < SIZE; i++ ) {
    if( i == 0 || i == SIZE - 1 ) { continue; }
    string line;
    cin >> line;
    if( i % 2 ) {
      for( int j = 0; j < H_LEN; j++ ) {
        field[ i ][ 2 + j * 2 ] = line[ j ] - '0';
      }
    } else {
      for( int j = 0; j < V_LEN; j++ ) {
        field[ i ][ 1 + j * 2 ] = line[ j ] - '0';
      }
 
    }
  }
/*
  for( int i = 0; i < SIZE; i++ ) {
    for( int j = 0; j < SIZE; j++ ) {
      if( i % 2 ) {
        cout << ( field[ i ][ j ] ? string("-") : string(".") ) << " " << flush;
      } else {
        cout << ( field[ i ][ j ] ? string("|") : string(".") ) << " " << flush;
      }
    }
    cout << endl;
  }
*/
  int counter = 0;
  int dir = 0;
  int x = 1, y = 1;
  int vx[ 4 ] = { 2, 0, -2, 0 };
  int vy[ 4 ] = { 0, 2, 0, -2 };
  int ax[ 4 ] = { 2, 1, -2, -1 };
  int ay[ 4 ] = { -1, 2, 1, -2 };
  int bx[ 4 ] = { 3, 0, -3, 0 };
  int by[ 4 ] = { 0, 3, 0, -3 };
  int cx[ 4 ] = { 2, -1, -2, 1 };
  int cy[ 4 ] = { 1, 2, -1, -2 };
  do {
    if( field[ y + ay[ dir ] ][ x + ax[ dir ] ] ) {
      x += vx[ dir ];
      y += vy[ dir ];
      cout << (
        dir == 0 ? "R" :
        dir == 1 ? "D" :
        dir == 2 ? "L" : "U"
      ) << flush;
      dir = ( dir - 1 + 4 ) % 4;
    } else if( field[ y + by[ dir ] ][ x + bx[ dir ] ] ) {
      x += vx[ dir ];
      y += vy[ dir ];
      cout << (
        dir == 0 ? "R" :
        dir == 1 ? "D" :
        dir == 2 ? "L" : "U"
      ) << flush;
    } else if( field[ y + cy[ dir ] ][ x + cx[ dir ] ] ) {
      x += vx[ dir ];
      y += vy[ dir ];
      cout << (
        dir == 0 ? "R" :
        dir == 1 ? "D" :
        dir == 2 ? "L" : "U"
      ) << flush;
      dir = ( dir + 1 ) % 4;
    } else {
      x += vx[ dir ];
      y += vy[ dir ];
       cout << (
        dir == 0 ? "R" :
        dir == 1 ? "D" :
        dir == 2 ? "L" : "U"
      ) << flush;
      dir = ( dir + 2 ) % 4;
    }
  } while( x != 1 || y != 1 );
  cout << endl;
  return EXIT_SUCCESS;
}