import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    bool[4][5][5] m;
    foreach(i;0..9)
        foreach(j,b;readln().chomp().map!"a!='0'"().array())
            if(b)
                foreach(k;0..2)
                    m[i/2+k*(i%2)][j+k*(1-i%2)][k*2+i%2]=true;
    string r;
    int x=0,y=0,d=0;
    do{
        foreach(i;-1..3)
        {
            auto n = (d+i+4)%4;
            if(m[y][x][n])
            {
                x += [1,0,-1,0][n];
                y += [0,1,0,-1][n];
                d=n;
                r~="RDLU"[n];
                break;
            }
        }
    }while(x!=0 || y!=0);
    writeln(r);
}