#include <iostream>
#include <string>
#include <vector>
using namespace std;

int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
string dc = "RDLU";

int main() {
    int g[11][11] = {};
    char c;
    for (int i=1; i<10; ++i) {
        if (i % 2 == 1) {
            for (int j=2; j<=8; j+=2) {
                cin >> c;
                g[i][j] = c - '0';
                g[i][j-1] |= g[i][j];
                g[i][j+1] |= g[i][j];
            }
        } else {
            for (int j=1; j<=9; j+=2) {
                cin >> c;
                g[i][j] = c - '0';
                g[i-1][j] |= g[i][j];
                g[i+1][j] |= g[i][j];
            }
        }
    }
    int x = 1, y = 1, d = 0;
    do {
        for (int t=3; t<=6; ++t) {
            if (g[y + dy[(d + t) % 4]][x + dx[(d + t) % 4]]) {
                d = (d + t) % 4;
                break;
            }
        }
        x += dx[d] * 2;
        y += dy[d] * 2;
        cout << dc[d];
    } while ( ! (x == 1 && y == 1));
    cout << endl;
    return 0;
}