#include <iostream>
#include <algorithm>
 
using namespace std;
 
#define rep(i,n) for(int i=0;i<int(n);i++)
 
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)a
                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 i,int j)
{
    return 0<=i && i<9 && 0<=j && j<9;
}
 
int main()
{
    bool grid[9][9]={{0}};
    input(grid);
     
    int i=0,j=0;
    dir prev=RIGHT;
    for(;;){
        dir next[4]={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;
}