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

class Dot{
public:
  bool d[4];
  Dot() {
    d[0] = d[1] = d[2] = d[3] = false;
  }
};

int main() {
  Dot data[5][5];
  for(int i = 0; i < 9; i++) {
    string str;
    getline(cin, str);
    int y = i/2;
    if(i % 2 == 0) {
      for(int j = 0; j < 4; j++) {
	if(str[j] == '1') {
	  data[y][j].d[0] = data[y][j+1].d[2] = true;
	}
      }
    } else {
      for(int j = 0; j < 5; j++)  {
	if(str[j] == '1') {
	  data[y][j].d[1] = data[y+1][j].d[3] = true;
	}
      }
    }
  }

  int d[4][2] = {{1,0},{0,1},{-1,0},{0,-1}};
  int x = 0;
  int y = 0;
  int dir = 0;
  while(1) {
    for(int i = 0; i < 4; i++) {
      int t = (dir+i+3)%4;
      if(data[y][x].d[t]) {
	dir = t;
	x += d[t][0];
	y += d[t][1];
	switch(t) {
	case 0: cout << 'R'; break;
	case 1: cout << 'D'; break;
	case 2: cout << 'L'; break;
	case 3: cout << 'U'; break;
	}
	break;
      }
    }
    if(x == 0 && y == 0) {
      cout << endl;
      break;
    }
  }
  return 0;
}