#include <iostream>
#include <string>
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) {
        int k = 1 + (i % 2);
        int l = 9 - (i % 2);
        for (int j=k; j<=l; j+=2) {
            cin >> c;
            g[i][j] = g[i][j-1] = g[i][j+1] = c - '0';
        }
    }
    int x = 1, y = 1, d = 0;
    do {
        for (int t=(d+3)%4; t<=(d+2)%4; t=(t+1)%4) {
            if (g[y + dy[t]][x + dx[t]]) {
                d = t;
                break;
            }
        }
        x += dx[d] * 2;
        y += dy[d] * 2;
        cout << dc[d];
    } while (x != 1 || y != 1);
    cout << endl;
    return 0;
}