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

int di[4] = {0, -1, 0, 1};
int dj[4] = {-1, 0, 1, 0};

void print(int c){
    if(c == 0) cout << "L";
    else if(c == 1) cout << "U";
    else if(c == 2) cout << "R";
    else cout << "D";
}

int main(){


    vector<vector<bool> > a(13, vector<bool> (13, true));
    for(int i = 0; i < 13; i++){
        a[i][0] = a[i][12] = false;
    }

    for(int j = 0; j < 13; j++){
        a[0][j] = a[12][j] = false;
    }

    for(int i = 0; i < 9; i++){

        if(i % 2 == 0){
            int h = i + 2;
            string s; cin >> s;
            for(int j = 0; j < 4; j++){
                int w = j * 2 + 3;
                if(s[j] == '1'){
                    a[h][w - 1] = false;
                    a[h][w] = false;
                    a[h][w + 1] = false;                    
                }
            }
        }else{
            int h = i + 2;
            string s; cin >> s;
            for(int j = 0; j < 5; j++){
                int w = j * 2 + 2;
                if(s[j] == '1'){
                    a[h - 1][w] = false;
                    a[h][w] = false;
                    a[h + 1][w] = false;                    
                }
            }
        }
    }

    /*for(int i = 0; i < 13; i++){
        for(int j = 0; j < 13; j++){
            cout << a[i][j];
        }
        cout << endl;
    }*/

    int s_k = 2;
    int s_i = 2;
    int s_j = 2;
    int k = 2;
    int i = 2;
    int j = 2;
    bool flag = false;
    while(1){

        if(flag && i == s_i && j == s_j) break;
        
        flag = true;
        for(int h = 0; h < 4; h++){

            int c = (k - 1 + 4 + h) % 4;
            if(a[i + di[c]][j + dj[c]] == 0 && a[i + 2*di[c]][j + 2*dj[c]] == 0){
                print(c);
                i = i + 2*di[c];
                j = j + 2*dj[c];
                k = c;
                break;
            }

        } 
    
    }

    return 0;
}
