#include <iostream>
#include <string>
using namespace std;
 
int a[12][12];
int dx[4]  = {1,0,-1,0};
int dy[4]  = {0,1,0,-1};
char dc[4] = {'R','D','L','U'};
 
//ツ篠ゥツ閉ェツづ個偲シツ暗債４ツマツスツづ個陛?づ個湘ウツ妥板づーツ陳イツづ猟づゥ
void cheakWall(int* wall , const int& px ,const int& py ,const int& d ){
    for(int i=0 ; i<4 ; ++i ){
        int mx = px + dx[(d+i)%4];
        int my = py + dy[(d+i)%4];
        wall[i] = a[my][mx];
    }
}
 
//ツ進ツづアツつセツ古シツつォツづーツ記ツ録
void record(string& s,int* wall,const int d){
    if( wall[1] ){
        s.push_back( dc[d] );
    }
}
 
//ツ進ツづ?void go(int& px, int& py, const int& d,int* wall, string& s){
    px += dx[d]*2;
    py += dy[d]*2;
    record( s , wall , d );
}
 
int main(){
    string s;
 
    //ツ配ツ療アツづ個渉可甘コツ可サ
    for(int y=0 ; y<12 ; ++y )
        for(int x=0 ; x<12 ; ++x )
            a[y][x] = 0;
 
    //ツ禿シツ療?    for(int i=0 ; i<9 ; ++i ){
        cin >> s;
        int y = i+1;
        int x = (i+1)%2 + 1;
        for(int j=0 ; j<(int)s.size() ; ++j , x+=2 ){
            a[y][x] = s[j] - '0';
        }
    }
 
    int px = 2, py = 0, d = 0;
    bool flag = false;
    s.clear();
 
    while( 1 ){
        if( px == 0 && py == 0 ) break;
 
        int wall[4]; 
        //ツ篠ゥツ閉ェツづ個偲シツづィツづ個湘ウツ妥?        cheakWall( wall , px , py , d );
 
        if( !wall[1] ){//ツ右ツつェツ陛?つカツづ。ツづ按つゥツづ?つスツづァ
            //ツ古シツつォツづーツ右ツ古シツつォツづ可嘉アツづゥ
            d = (d+1)%4;
            //ツ進ツづ?         go( px , py , d , wall , s );
            flag = false;
        }else{
            if( !wall[0] ){//ツ前ツつェツ陛?つカツづ。ツづ按つゥツづ?つスツづァ
                //ツ進ツづ?             go( px , py , d , wall , s );
                flag = false;
            }else{
                if( !wall[3] ){//ツ債カツつェツ陛?つカツづ。ツづ按つゥツづ?つスツづァ
                    if( flag == false ){
                        //ツ進ツづアツつセツ古シツつォツづーツ記ツ録
                        record( s , wall , d );
                    }
                    //ツ古シツつォツづーツ債カツ古シツつォツづ可嘉アツづゥ
                    d = (d+3)%4;
                    //ツ進ツづ?                 go( px , py , d , wall , s );
                    flag = false;
                }else{//ツ前ツ・ツ右ツ・ツ債カツつェツ陛?つセツづ?つスツづァ
                    flag = true;
                    //ツ進ツづアツつセツ古シツつォツづーツ記ツ録
                    record( s , wall , d );
                    //ツ古シツつォツづーツ右ツ古シツつォツづ可嘉アツづゥ
                    d = (d+3)%4;
                    //ツ進ツづアツつセツ古シツつォツづーツ記ツ録
                    s.push_back( dc[d] );
                }
            }
        }
    }
    cout << s << endl;
}