#include <iostream>
using namespace std;

char const * direct_text[] = {"R", "D", "L", "U"};

bool can_move(int a[10][6], int x, int y, int d)
{
    if ( (d == 0 && a[2*x-1][y  ] == 1) ||
         (d == 1 && a[2*x  ][y  ] == 1) ||
         (d == 2 && a[2*x-1][y-1] == 1) ||
         (d == 3 && a[2*x-2][y  ] == 1) )
        return 1;
    else 
        return 0;
}

int main(void) {
    int a[10][6] = {{}};
    char c;

    for (int i = 1; i <= 9; ++i)
        for (int j = 1; j <= 5; ++j)
            if (j <= 4 || i%2==0) {
                cin >> c;
                a[i][j] = c - '0';
            }

    int x = 1, y = 1, d = 0;

    while (true) {
        for (int i = 0; i < 4; ++i) {
            if (can_move(a, x, y, (d+3+i)%4)) {
                d = (d+3+i)%4;
                if (d == 0)
                    y += 1;
                else if (d == 1)
                    x += 1;
                else if (d == 2)
                    y -= 1;
                else
                    x -= 1;
                cout << direct_text[d];
                break;
            }
        }
        if (x == 1 && y == 1)
            break;
    }
    cout << endl;
    return 0;
}

