#include<iostream>
#include<string>
using namespace std;
int main(){
  int field[6][6]={0};
  string s;
  for(int i=0; i<5; i++){
    cin >>s;
    for(int j=0; j<4; j++){
      if(s[j] == '1'){
	field[j+1][i]+=4;
	field[j+1][i+1]+=1;
      }
    }
    if(i<4){
      cin >>s;
      for(int j=0; j<5; j++){
	if(s[j] == '1'){
	  field[j][i+1]+=2;
	  field[j+1][i+1]+=8;
	}
      }
    }
  }
  int px = 1,py=0,d=2;
  for(int i=0;; i++){
    if(d == 1){
      if(!(field[px][py]&2)){px++;d = 2;}
      else{
	if(field[px][py]&1){cout <<"U";d = 8;}
	else{cout <<"U";py--;}
      }
    }
    else if(d == 2){
      if(!(field[px][py]&4)){py++;d = 4;}
      else{
	if(field[px][py]&2){cout <<"R";d = 1;}
	else{cout <<"R";px++;}
      }
    }
    else if(d == 4){
      if(!(field[px][py]&8)){px--;d = 8;}
      else{
	if(field[px][py]&4){cout <<"D";d = 2;}
	else if(field[px][py]&8){cout <<"D";py++;}
      }
    }
    else if(d == 8){
      if(!(field[px][py]&1)){py--;d = 1;}
      else{
	if(field[px][py]&8){cout <<"L";d = 4;}
	else{cout <<"L";px--;}
      }
    }
    if(px == 1 && py == 0){cout <<endl; break;}
  }
  return 0;
}