#include <iostream>
#include <vector>
using namespace std;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
char dc[5] = "RDLU";
 
bool cangocw(int y, int x, int dir, vector<string> &s){
    if(dir%2==0){
        return s[2*y +1][x +1-(dir/2)] == '0';
    }else{
        return s[2*y +(1-dir/2)*2][x+1] == '0';
    }
}
 
int main(){
    vector<string> s(11);
    s[0] = s[10] = "0000000";
    for(int i=1; i<=9; i++){
        cin >> s[i];
        s[i] = "0" + s[i] + "0";
    }
    int dir=0;
    int x=0, y=0;
    string ans = "";
     
    do{
        if(cangocw(y, x, dir, s)){
            dir = (dir+1)%4;
            continue;
        }
        x += dx[dir];
        y += dy[dir];
        ans += dc[dir];
        dir = (dir+3)%4;
    }while(!(x==0 && y==0 && dir==0));
    cout << ans << endl;
    return 0;
}

