#include<iostream>
using namespace std;

int main()
{
  char sidemap[5][4];
  char upmap[4][5];
  int x=0,y=0;
  for(int i=0;i<9;i++)
    {
      if(i%2==0)
	{
	  for(int j=0;j<4;j++)
	      cin>>sidemap[i/2][j];
	}
      else
	{
	  for(int j=0;j<5;j++)
	    cin>>upmap[i/2][j];
	}
    }
  /*
  for(int i=0;i<5;i++,cout<<endl)
    for(int j=0;j<4;j++)
      {
	cout<<sidemap[i][j];
      }

  for(int i=0;i<4;i++,cout<<endl)
    for(int j=0;j<5;j++)
      {
	cout<<upmap[i][j];
      }
  */
  char move='R';
  do{
    //cout<<"now:"<<x<<","<<y;
    //    cout<<"X,y="<<x<<","<<y<<endl;
    //次の移動方向
    if(move=='L')
      {
	if(x<4&&upmap[x][y]=='1')
	  move='D';
	else if(y>0 && sidemap[x][y-1]=='1')
	  move='L';
	else if(x>0 && upmap[x-1][y]=='1')
	  move='U';
	else
	  move='R';
      }
    else if(move=='R')
      {
	if(x>0&&upmap[x-1][y]=='1')
	  move='U';
	else if(y<4 && sidemap[x][y]=='1')
	  move='R';
	else if(x<4&&y<5&&upmap[x][y]=='1')
	  move='D';
	else
	  move='L';
      }
    else if(move=='U')
      {
	if(y>0&&sidemap[x][y-1]=='1')
	  move='L';
	else if(x>0&&upmap[x-1][y]=='1')
	  move='U';
	else if(x<5&&y<4&&sidemap[x][y]=='1')
	  move='R';
	else
	  move='D';
      }
    else if(move=='D')
      {
	if(x<5&&y<4&&sidemap[x][y]=='1')
	  move='R';
	else if(x<4&&upmap[x][y]=='1')
	  move='D';
	else if(y>0&&sidemap[x][y-1]=='1')
	  move='L';
	else 
	  move='U';
      }
    //次の移動方向
    if(move=='L')
      {
	y--;
      }
    else if(move=='R')
      {
	y++;
      }
    else if(move=='U')
      {
	x--;
      }
    else if(move=='D')
      {
	x++;
      }
      
      cout<<move;
      ///      cout<<endl;
  }while(x!=0||y!=0);
  cout<<endl;
}