#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<vector<vector<bool> > > wall(5, vector<vector<bool> >(5, vector<bool>(4, false)));

    for(int i=0; i<5; ++i){
        for(int j=0; j<4; ++j){
            char a;
            cin >> a;
            if(a == '1')
                wall[i][j][0] = wall[i][j+1][2] = true;
        }
        if(i < 4){
            for(int j=0; j<5; ++j){
                char a;
                cin >> a;
                if(a == '1')
                    wall[i][j][1] = wall[i+1][j][3] = true;
            }
        }
    }

    char dir[] = {'R', 'D', 'L', 'U'};
    int dy[] = {0, 1, 0, -1};
    int dx[] = {1, 0, -1, 0};

    int y = 0;
    int x = 0;
    int d = 0;
    do{
        if(wall[y][x][d]){
            y += dy[d];
            x += dx[d];
            cout << dir[d];
            d += 3;
            d %= 4;
        }else{
            ++ d;
            d %= 4;
        }
    }while(y != 0 || x != 0);

    cout << endl;
    return 0;
}