#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int xdir[4] = {0, 1, 0, -1}, ydir[4] = {-1, 0, 1, 0};
char dir[4] = {'U', 'R', 'D', 'L'};

int main()
{
  int l, x, y, d;
  string str;
  bool a[11][11][11][11]; // current pos[h][w], next pos[h][w]

  while(cin>>str){
    l = str.size()+1;
    y = 1;
    fill(&a[0][0][0][0], &a[l+1][0][0][0], false);

    for(int i = 1; i < l; ++i)
      if(str[i-1] == '1')
	a[0][i-1][0][i] = a[0][i][0][i-1] = true;

    for(int i = 1; i <= 8; ++i){
      cin >> str;
      if(i%2){
	for(int j = 0; j < l; ++j)
	  if(str[j] == '1') 
	    a[y-1][j][y][j] = a[y][j][y-1][j] = true;
      } else {
	for(int j = 1; j < l; ++j)
	  if(str[j-1] == '1')
	    a[y][j-1][y][j] = a[y][j][y][j-1] = true;
	y++;
      }
    }

    x = y = d = 0;
    do {
      for(int i = 3; i < 7; ++i){
	int dx = x+xdir[(d+i)%4], dy = y+ydir[(d+i)%4];
	
	if(0 <= dx && dx < l && 0 <= dy && dy < l && a[y][x][dy][dx]){
	  cout << dir[(d+i)%4];
	  // cout<<": ("<<x<<", "<<y<<") -> ("<<dx<<", "<<dy<<")"<<endl;  
	  a[y][x][dy][dx] = false;
	  x = dx;
	  y = dy;
	  d = (d+i)%4;
	  break;
	}
      }
    } while(x+y != 0);
    
    cout << endl;
  }

  return 0;
}