#coding: utf-8
def xxx(position, direction):
    if direction == 'R' or direction == 'L':
        if not (0 <= position[tate] <= 8 and 0 <= position[yoko] <= 3):
            return 
    elif direction == 'U' or direction == 'D':
        if not (1 <= position[tate] <= 7 and 0 <= position[yoko] <= 4):
            return
    if mapp[position[tate]][position[yoko]] == 0:
        return
    if (position[tate] == 0 and position[yoko] == 0) and direction == 'L' or \
       (position[tate] == 1 and position[yoko] == 0) and direction == 'U':
        result.append(direction)
        print ''.join(result)
        return True
    elif mapp[position[tate]][position[yoko]] == 1:
        result.append(direction)
        if kyoto(position, direction): return True

def kyoto(position, direction):
    if direction == 'R':
        #????????????????´¢
        check_position = position[tate]-1, position[yoko]+1
        direction = 'U'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate], position[yoko]+1
        direction = 'R'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate]+1, position[yoko]+1
        direction = 'D'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate], position[yoko]
        direction = 'L'
        if xxx(check_position, direction): return True
    elif direction == 'U':
        #????????????????´¢
        check_position = position[tate]-1, position[yoko]-1
        direction = 'L'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate]-2, position[yoko]
        direction = 'U'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate]-1, position[yoko]
        direction = 'R'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate], position[yoko]
        direction = 'D'
        if xxx(check_position, direction): return True
    elif direction == 'L':
        #????????????????´¢
        check_position = position[tate]+1, position[yoko]
        direction = 'D'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate], position[yoko]-1
        direction = 'L'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate]-1, position[yoko]
        direction = 'U'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate], position[yoko]
        direction = 'R'
        if xxx(check_position, direction): return True
    elif direction == 'D':
        #????????????????´¢
        check_position = position[tate]+1, position[yoko]
        direction = 'R'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate]+2, position[yoko]
        direction = 'D'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate]+1, position[yoko]-1
        direction = 'L'
        if xxx(check_position, direction): return True
        #????????????????´¢
        check_position = position[tate], position[yoko]
        direction = 'U'
        if xxx(check_position, direction): return True

if __name__ == '__main__':
    mapp = []
    for i in range(9):
        mapp.append([int(char) for char in raw_input()])
    tate = 0
    yoko = 1
    result = []
    xxx((0,0), 'R')

Measured memory_bytes: 4468