# Robot Detector SOLUTION UKROBOT

Page Contents

### Robot Detector SOLUTION UKROBOT

There is a robot in the cell [Math Processing Error] of an infinite grid. One cell [Math Processing Error] contains an obstacle and all other cells are free. We only know that [Math Processing Error] and [Math Processing Error], but not the exact location of the obstacle.

You may give the robot a sequence of instructions. There are four types of instructions:

L: move one cell to the left, i.e. from a cell [Math Processing Error] to [Math Processing Error]

R: move one cell to the right, i.e. from a cell [Math Processing Error] to [Math Processing Error]

D: move one cell down, i.e. from a cell [Math Processing Error] to [Math Processing Error]

U: move one cell up, i.e. from a cell [Math Processing Error] to [Math Processing Error]

The robot attempts to perform these instructions one by one. When performing an instruction, if the cell it needs to move to is free, then it moves to that cell; otherwise, it stays in its current cell.

Consider the following process: you choose a fixed sequence of instructions for the robot, which performs these instructions; then you are given the final cell of the robot and based on only that information, you determine the position of the obstacle. Find a sufficiently short sequence of instructions such that if this process was performed, you would always be able to correctly determine the position of the obstacle. It can be proved that for the given constraints, such a sequence always exists.

Input

The first and only line of the input contains two space-separated integers [Math Processing Error] and [Math Processing Error].

Output

Print a single line containing one string, which should describe the sequence of instructions for the robot. This string may only contain the characters ‘L’, ‘R’, ‘U’ and ‘D’, and its length must not exceed [Math Processing Error].

Constraints

[Math Processing Error]

Subtask #1 (5 points): [Math Processing Error]

Subtask #2 (20 points): [Math Processing Error]

Subtask #3 (75 points): original constraints

Example Input

1 2

Example Output

UR

Explanation

If the obstacle is in the cell [Math Processing Error], the robot ends up in the cell [Math Processing Error]. Otherwise, i.e. if the obstacle is in the cell [Math Processing Error], the robot ends up in [Math Processing Error]. The final position of the robot would always be enough to find the obstacle.