Gathering Cubes

Time limit1sMemory limit128 MB

Problem

A robot and five cubes are placed on a large grid board made of unit squares. The robot and each cube each occupy exactly one square.

The robot can move one square up, down, left, or right. If the square it tries to enter contains a cube, the robot pushes that cube one square in the same direction.

The cubes are magnetic. Whenever two cubes are on edge-adjacent squares, they immediately stick together and become one object. Cubes in the same object always move together. Therefore, if the robot pushes one cube in a stuck object, every other cube in that object also moves one square in the same direction.

The goal is to make all five cubes stick together so that, when viewed from above, they form the fixed upright T shape. This shape consists of three consecutive squares in one row, with two more consecutive squares extending downward from the middle square.

Given the initial positions of the cubes, output a sequence of robot moves that achieves the goal.

Input

The input consists of 5 lines. Each line contains the coordinates X and Y of one cube. The coordinates satisfy -5 <= X, Y <= 5.

The robot starts at (0, 0), and that square does not contain a cube.

Initially, no two cubes share an edge. They may share only a corner.

Output

Print one line containing the robot moves. Use U for up, L for left, R for right, and D for down.

The number of moves you print must not exceed 9999. If several valid move sequences exist, you may print any one of them.