#include <iostream>
#include <algorithm>
#define rep(i,n) for(int i = 0 ; i < n ; i++ )
using namespace std;
void input(bool grid[][9]){
  rep(i,9){
    string s;
    cin >> s;
    if(i%2 == 0){
      rep(j,4)grid[i][j*2+1] = s[j] - '0';
    } else {
      rep(j,5)grid[i][j*2] = s[j] - '0';
    }
  }
}

enum dir{
  UP,RIGHT,DOWN,LEFT
};
const int di[] = {-1,0,1,0};
const int dj[] = {0,1,0,-1};
const char output[] = "URDL";

bool in_range(int a,int b){
  return 0 <= a && a < 9 && 0 <= b && b < 9;
}
int main(){
  bool grid[9][9] = {{0}};
  input(grid);

  int i = 0,j = 0;
  dir prev = RIGHT;
  for(;;){
    dir next[] = {LEFT,UP,RIGHT,DOWN};
    rotate(next,next + prev,next + 4);

    int k;
    for(k = 0 ; k < 3 ; k++ ){
      if(in_range(i+di[next[k]],j+dj[next[k]]) &&
	 grid[i+di[next[k]]][j+dj[next[k]]]){
	break;
      }
    }
    cout << output[next[k]];
    i+=di[next[k]]*2;
    j+=dj[next[k]]*2;
    prev = next[k];
    if(i == 0 && j == 0)break;
  } 
  cout << endl;
  return 0;
}