Statement
Each cell of an grid is either inhabited or uninhabited. The rows are numbered from top to bottom, and the columns are numbered from left to right. A grid point is represented by coordinates , where and .
Input
The input is given in the following format.
Output
For each test case, print the following two lines.
must be a string of length , and each character must be one of U, D, L, and R. These characters indicate a move by one grid point upward, downward, leftward, and rightward, respectively.
The movement sequence represented by must start at , remain inside the grid at all times, and end at .
Constraints
- .
- .
- The sum of over all test cases is at most .
Scoring
Each subtask is scored independently. The approximation-ratio criteria below apply equally to every subtask.
For each test case, let be the optimal cost and let be the actual cost of the valid path printed by the contestant. Define the approximation ratio as follows.
Subtasks
Samples
In the first test case, there are no inhabited cells, so the printed path has cost .
In the second test case, the left cell is inhabited. Since the starting point is one of its corners, every path has cost at least . The sample path has cost .
In the third test case, an inhabited cell exists, but the printed path does not visit any of its corners. Therefore, the path has cost .