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 .
You must output a path along the grid lines from to . In one move, you may move to a vertically or horizontally adjacent grid point, and you may not leave the grid.
For each inhabited cell, a cost of is incurred if the path visits at least one of the cell's four corners. Even if the path visits multiple corners of the same cell, that cell's cost is counted only once. The cost of a path is the number of cells for which a cost is incurred.
See the Scoring section for the exact scoring rules.
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 .