#include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repb(i,a,b) for(int i=a;i>=b;i--)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
//#define int long long
#define fi first
#define se second
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

string s = "URDL";
int dx[4] = { 0, 1,  0, -1};
int dy[4] = {-1, 0,  1,  0};

signed main() {
    string ans = "";
    int f[5][5][4] = {0};
    string wx[5];
    string wy[4];
    rep(i, 0, 9){
        if(i % 2 == 0){
            cin >> wx[i / 2];
        }else{
            cin >> wy[i / 2];
        }
    }
    f[0][0][0] = 1;
    int y = 0, x = 0, dir = 0;
    while(1){
        rep(i, 0, 4){
            int tmp = (dir + i) % 4;
            int ny = y + dy[tmp];
            int nx = x + dx[tmp];
            if(!(0 <= ny && ny <= 4 && 0 <= nx && nx <= 4)) continue;
            if(tmp == 0 && wy[y - 1][x] == '0') continue;
            if(tmp == 1 && wx[y][x] == '0') continue;
            if(tmp == 2 && wy[y][x] == '0') continue;
            if(tmp == 3 && wx[y][x - 1] == '0') continue;
            if(f[ny][nx][(dir + i + 3) % 4] == true) continue;
            f[ny][nx][(dir + i + 3) % 4] = true;
            y = ny;
            x = nx;
            dir = (dir + i + 3) % 4;
            ans += s[tmp];
            //o(y<<" "<<x<<" "<<dir<<" "<<ny<<" "<<nx<<" "<<tmp<<" "<<s[tmp]);
            break;
        }
        if(f[0][0][2] || f[0][0][3]) break;
    }
    cout << ans << endl;
}