#include <iostream>
#include <cstdlib>
using namespace std;

int main() {
  int vx,vy,direction;
  string str;
  vx = 2;
  vy = 2;
  direction = 1;
  int ex[9][8]={0},ey[8][9]={0};
  for(int i=0;i<9;i++) {
    if((i == 0)||(i == 2)||(i == 4)||(i == 6)||(i == 8)) {
      //  cin >> ex[i/2][0] >> ex[i/2][1] >> ex[i/2][2] >> ex[i/2][3];
      cin >> str;
      ex[i/2+2][2] = atoi(str.substr(0,1).c_str());
      ex[i/2+2][3] = atoi(str.substr(1,1).c_str());
      ex[i/2+2][4] = atoi(str.substr(2,1).c_str());
      ex[i/2+2][5] = atoi(str.substr(3,1).c_str());
    }
    else {
      //  cin >> ey[0][(i-1)/2] >> ey[1][(i-1)/2] >> ey[2][(i-1)/2] >> ey[3][(i-1)/2] >> ey[4][(i-1)/2];
      cin >> str;
      ey[2][(i-1)/2+2] = atoi(str.substr(0,1).c_str());
      ey[3][(i-1)/2+2] = atoi(str.substr(1,1).c_str());
      ey[4][(i-1)/2+2] = atoi(str.substr(2,1).c_str());
      ey[5][(i-1)/2+2] = atoi(str.substr(3,1).c_str());
      ey[6][(i-1)/2+2] = atoi(str.substr(4,1).c_str());
    }
  }
  /*    for(int i=2;i<7;i++) {
      for(int j=2;j<6;j++) {
      cout << ex[i][j];
      }
      cout << endl;
      } */

  while(1) {
    if(direction == 1) {
      if(ey[vy-1][vx] == 1) {
	vy--;
	direction = 2;
	cout << "U";
      }
      else if(ex[vy][vx] == 1) {
	vx++;
	direction = 1;
	cout << "R";
      }
      else if(ey[vy][vx] == 1) {
	vy++;
	direction = 4;
	cout << "D";
      }
    }
    else if(direction == 2) {
      if(ex[vy][vx-1] == 1) {
	vx--;
	direction = 3;
	cout << "L";
      }
      else if(ey[vy-1][vx] == 1) {
	vy--;
	direction = 2;
	cout << "U";
      }
      else if(ex[vy][vx] == 1) {
	vx++;
	direction = 1;
	cout << "R";
      }
    }
    else if(direction == 3) {
      if(ey[vy][vx] == 1) {
	vy++;
	direction = 4;
	cout << "D";
      }
      else if(ex[vy][vx-1] == 1) {
	vx--;
	direction = 3;
	cout << "L";
      }
      else if(ey[vy-1][vx] == 1) {
	vy--;
	direction = 2;
	cout << "U";
      }
    }
    else if(direction == 4) {
      if(ey[vy][vx] == 1) {
	vx++;
	direction = 1;
	cout << "R";
      }
      else if(ey[vy][vx] == 1) {
	vy++;
	direction = 4;
	cout << "D";
      }
      else if(ex[vy][vx-1] == 1) {
	vx--;
	direction = 3;
	cout << "L";
      }
    }
  }
  cout << endl;
}