#ABC051C. Back and Forth
Back and Forth
Problem Statement
Dolphin resides in two-dimensional Cartesian plane, with the positive -axis pointing right and the positive -axis pointing up. Currently, he is located at the point . In each second, he can move up, down, left or right by a distance of . Here, both the - and -coordinates before and after each movement must be integers. He will first visit the point where and , then go back to the point , then visit the point again, and lastly go back to the point . Here, during the whole travel, he is not allowed to pass through the same point more than once, except the points and . Under this condition, find a shortest path for him.
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
sx sy tx ty
Output
Print a string that represents a shortest path for Dolphin.
The -th character in should correspond to his -th movement.
The directions of the movements should be indicated by the following characters:
U: Up
D: Down
L: Left
R: Right
If there exist multiple shortest paths under the condition, print any of them.
Samples
0 0 1 2
UURDDLLUUURRDRDDDLLU
One possible shortest path is:
- Going from to for the first time:
- Going from to for the first time:
- Going from to for the second time: $(0,0) → (−1,0) → (−1,1) → (−1,2) → (−1,3) → (0,3) → (1,3) → (1,2)$
- Going from to for the second time: $(1,2) → (2,2) → (2,1) → (2,0) → (2,−1) → (1,−1) → (0,−1) → (0,0)$
-2 -2 1 1
UURRURRDDDLLDLLULUUURRURRDDDLLDL