#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

char d[10][6];

void solve(int y,int x,int way){
  if(y==0&&x==0){
    if(way==2)cout<<"U";
    else cout<<"L";
    return;
  }
  if(way==1){
    cout<<"R";
    if(y>0&&d[y-1][x+1]=='1')solve(y-1,x+1,2);
    else if(x<4&&d[y][x+1]=='1')solve(y,x+1,1);
    else if(y<8&&d[y+1][x+1]=='1')solve(y+1,x+1,4);
    else if(x>0&&d[y][x-1]=='1')solve(y,x-1,3);
  }
  else if(way==2){
    cout<<"U";
    if(x>0&&d[y-1][x-1]=='1')solve(y-1,x-1,3);
    else if(y>1&&d[y-2][x]=='1')solve(y-2,x,2);
    else if(x<4&&d[y-1][x]=='1')solve(y-1,x,1);
    else if(y<7&&d[y+2][x]=='1')solve(y+2,x,4);
  }
  else if(way==3){
    cout<<"L";
    if(y<8&&d[y+1][x]=='1')solve(y+1,x,4);
    else if(x>0&&d[y][x-1]=='1')solve(y,x-1,3);
    else if(y>0&&d[y-1][x]=='1')solve(y-1,x,2);
    else if(x<4&&d[y][x+1]=='1')solve(y,x+1,1);
  }
  else if(way==4){
    cout<<"D";
    if(x<4&&d[y+1][x]=='1')solve(y+1,x,1);
    else if(y<7&&d[y+2][x]=='1')solve(y+2,x,4);
    else if(x>0&&d[y+1][x-1]=='1')solve(y+1,x-1,3);
    else if(y>1&&d[y-2][x]=='1')solve(y-2,x,2);
  }
}

int main(void){
  for(int i=0;i<9;i++){
    cin>>d[i];
  }
  cout<<"R";
  solve(0,1,1);
  cout<<endl;
  return 0;
}