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

vector<string> field;

void init() {
    string l;
    for (int i = 0; i < 9; i++) {
        cin >> l;
        string line = "";
        if (i % 2) {
            for (int j = 0; j < 9; j++) {
                if (j % 2) {
                    line.push_back(' ');
                } else {
                    line.push_back(l[j/2]);
                }
            }
        } else {
            for (int j = 0; j < 9; j++) {
                if (j % 2) {
                    line.push_back(l[j/2]);
                } else {
                    line.push_back(' ');
                }
            }
        }
        field.push_back(line);
    }
}

#define R 0
#define U 1
#define L 2
#define D 3

char DIRSTR[] = {'R', 'U', 'L', 'D'};

int main() {
    init();

    int dir = R;
    int x = 0;
    int y = 0;

    while (true) {
        switch (dir) {
            case R:
                if (x + 2 >= 9 || field[y][x+1] == '0')  {
                    if (!(y - 2 < 0 || field[y-1][x] == '0')) {
                        dir = U;
                    } else if (!(y + 2 >= 9 || field[y+1][x] == '0')) {
                        dir = D;
                    } else {
                        dir = L;
                    }
                } else {
                    x += 2;
                    cout << DIRSTR[dir];
                }
                break;
            case D:
                if (y + 2 >= 9 || field[y+1][x] == '0') {
                    if (!(x + 2 >= 9 || field[y][x+1] == '0'))  {
                        dir = R;
                    } else if (!(x - 2 < 0 || field[y][x-1] == '0')) {
                        dir = L;
                    } else {
                        dir = U;
                    }
                } else {
                    y += 2;
                    cout << DIRSTR[dir];
                }
                break;
            case L:
                if (x - 2 < 0 || field[y][x-1] == '0') {
                    if (!(y + 2 >= 9 || field[y+1][x] == '0')) {
                        dir = D;
                    } else if (!(y - 2 < 0 || field[y-1][x] == '0')) {
                        dir = U;
                    } else {
                        dir = R;
                    }
                } else {
                    x -= 2;
                    cout << DIRSTR[dir];
                }
                break;
            case U:
                if (y - 2 < 0 || field[y-1][x] == '0') {
                    if (!(x - 2 < 0 || field[y][x-1] == '0')) {
                        dir = L;
                    } else if (!(x + 2 >= 9 || field[y][x+1] == '0'))  {
                        dir = R;
                    } else {
                        dir = D;
                    }
                } else {
                    y -= 2;
                    cout << DIRSTR[dir];
                }
                break;
        }
        if (x == 0 && y == 0) break;
    }
    cout << endl;
    return 0;
}