import std.stdio;
import std.string;
import std.conv;

const int RIGHT = 6;
const int DOWN = 2;
const int LEFT = 4;
const int UP = 8;

void main()
{
    bool[9][9] sq;
    foreach (y; 0..8) {
        foreach (x, c; readln.chomp) {
            sq[y*2][1+x*2] = (c == '1');
        }
        foreach (x, c; readln.chomp) {
            sq[y*2+1][x*2] = (c == '1');
        }
    }
    int x, y, direction = RIGHT;

    while (true) {
        final switch(direction) {
        case DOWN:
            if (x != 8 && sq[y][x+1]) {
                x += 2;
                direction = RIGHT;
                direction.p_alpha;
            } else if (y != 8 && sq[y+1][x]) {
                y += 2;
                direction.p_alpha;
            } else {
                direction = DOWN;
            }
            break;
        case LEFT:
            if (y != 8 && sq[y+1][x]) {
                y += 2;
                direction = RIGHT;
                direction.p_alpha;
            } else if (x != 0 && sq[y][x-1]) {
                x -= 2;
                direction.p_alpha;
            } else {
                direction = UP;
            }
            break;
        case RIGHT:
            if (y != 0 && sq[y-1][x]) {
                y -= 2;
                direction = RIGHT;
                direction.p_alpha;
            } else if (x != 8 && sq[y][x+1]) {
                x += 2;
                direction.p_alpha;
            } else {
                direction = LEFT;
            }
            break;
        case UP:
            if (x != 0 && sq[y][x-1]) {
                x -= 2;
                direction = RIGHT;
                direction.p_alpha;
            } else if (y != 0 && sq[y-1][x]) {
                y -= 2;
                direction.p_alpha;
            } else {
                direction = RIGHT;
            }
            break;
        }
        if (!x && !y) break;
    }
    writeln;
}

void p_alpha(int dir) {
    final switch(dir) {
    case 2: 'D'.write; break;
    case 4: 'L'.write; break;
    case 6: 'R'.write; break;
    case 8: 'U'.write; break;
    }
}