#include <bits/stdc++.h>
using namespace std;

const int vx[]={1,0,-1,0};
const int vy[]={0,-1,0,1};
const char vec[]={'R','U','L','D'};

int main(void){
    string s;
    int cd=0;
    int cm[2]={0,1};
    vector<vector<vector<bool> > >m(5,vector<vector<bool> >(5,vector<bool>(4,false)));
    for (int i = 0; i < 9; ++i) {
        cin >> s;
        for (int j = 0; j < s.length(); ++j) {
            if (i % 2 == 0) {
                if (s[j] == '1') {
                    m[i / 2][j][0] = true;
                    m[i / 2][j + 1][2] = true;
                }
            } else {
                if (s[j] == '1') {
                    m[(i - 1) / 2][j][3] = true;
                    m[(i + 1) / 2][j][1] = true;
                }
            }
        }
    }
        int nd[4];
        int d;
        cout<<"R";
        while(cm[0]!=0||cm[1]!=0){
            for (int i = 0; i < 4; ++i) {
                d=(cd+1-i>3)?0:cd+1-i;
                if(d<0)d+=4;
                nd[i]=d;
            }
            for (int i = 0; i < 4; ++i) {
                if(m[cm[0]][cm[1]][nd[i]]){
                    cm[0]+=vy[nd[i]];
                    cm[1]+=vx[nd[i]];
                    cd=nd[i];
                    cout<<vec[nd[i]];
                    break;
                }
            }
        }
        cout<<endl;
    return 0;
}
