Statement
This problem uses the same rules as Holmes and Watson's Bet, but the target range for is larger.
Watson has developed an autonomous robot that moves on a grid. To test the robot, Watson makes a bet with his friend Holmes. Your task is to place mirrors and walls so that the robot takes as long as possible to reach the finish cell from the start cell.
The robot always attempts to move one cell in the direction it is facing. Its behavior depends on the cell it is trying to enter.
- Empty cell: the robot moves into that cell. The start and finish cells are also treated as empty cells.
- Mirror: first compute the reflected direction using the mirror's current shape. Then move into the mirror cell, flip the mirror, and finally face the direction computed before the flip.
- Wall: the robot does not move and turns degrees in place.
- Outside the grid: the robot leaves the grid and can never reach the finish cell afterward.
The reflection rules are as follows.
/: right up, up right, left down, down left.\: right down, down right, left up, up left.
A mirror flips only when the robot enters its cell. If the robot is already standing on a mirror cell and turns around because of a wall, that mirror does not flip.
Moving by one cell takes second, while changing direction takes no time. Therefore, the time until the robot reaches the finish cell equals the number of moves made inside the grid. The robot stops immediately when it reaches the finish cell.
Holmes has built a board that takes an astonishing seconds to finish. Help Watson beat Holmes by constructing an even slower board.
For a valid output, the finishing time must not exceed . An output with is treated as invalid.
Scoring
Let be the number of seconds needed for the robot to reach the finish cell on your board. A valid output receives the following score.
The problem is considered solved when the score is at least . Equivalently, you need . An invalid board receives points.
Input
This is an Output Only problem. No input is given.
Output
Print lines, each containing exactly characters with no spaces.
The following characters may be used.
U,D,L,R: the start cell. The letter specifies the initial direction: up, down, left, or right, respectively.F: the finish cell..: an empty cell.#: a wall./,\: mirrors.
Your output must satisfy all of the following conditions.
- There are exactly lines, and each line contains exactly characters.
- Only the characters listed above are used.
- Exactly one start cell and exactly one finish cell exist.
- Starting from the start cell, the robot eventually reaches the finish cell. It must not leave the grid or enter an infinite loop.
- The finishing time is at most .
An invalid board receives points.
Constraints
- No input is given.
- The output grid always has size .
- For every valid output, .