//35
#include<iostream>

using namespace std;

int main(){
  bool w[11][11]={{}};
  for(int i=1;i<=9;i++){
    for(int j=1+i%2;j<10;j+=2){
      char c;
      cin>>c;
      w[i][j]=c-'0';
    }
  }
  int y=0,x=2;
  int d=1;
  int dy[]={-1,0,1,0};
  int dx[]={0,1,0,-1};
  do{
    const char *s="URDL";
    d=(d+1)%4;
    while(w[y+dy[d]][x+dx[d]]){
      cout<<s[(d+3)%4];
      d=(d+3)%4;
    }
    y+=dy[d]*2;
    x+=dx[d]*2;
  }while(x);
  cout<<endl;
  return 0;
}