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

#define MAX 10

const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};

bool wall[4][MAX][MAX];

void print(int d) {
  switch(d) {
  case 0: cout<<"L"; break;
  case 1: cout<<"U"; break;
  case 2: cout<<"R"; break;
  case 3: cout<<"D"; break;
  }
}

int main() {
  
  char ch;
  for(int i=0; i<5; i++) {
    for(int j=0; j<4; j++) {
      cin >> ch;
      wall[3][i][j+1] = wall[1][i+1][j+1] = 1;
    }
    if(i<4) {
      for(int j=0; j<5; j++) {
	cin >> ch;
	wall[2][i+1][j] = wall[0][i+1][j+1] = 1;
      }
    }
  }
  
  bool start = 0;
  int x = 1, y = 0;
  int d = 2;
  while( !(x == 1 && y == 0 && start) ) {
    start = 1;
    
    x += dx[d], y += dy[d]; print(d);
    
    if(!wall[d][y][x]) {
      d = (d + 1) % 4;
      x += dx[d], y += dy[d]; print(d);
    }
  }
  cout << endl;
  
  return 0;
}