L. Laser Battle (Moving Right)
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Like a true gamer, you are truly a W-key (forward moving) player. You would never do something as shameful as S-keying (going backwards), so you have removed that key from your keyboard entirely.

Your friends have recently introduced you to the genre of platformer games. To your dismay, you have noticed that in these games, you have to move right (D-key) instead of forward. As you want to demonstrate to your friends that you are the superior gamer, you have also removed your A-key (moving left).

One level of the platformer you are playing right now works as follows. Initially, there are some enemies to the left and right of you. Every second, you can do exactly one of the following actions:

  • move right — move $$$1$$$ space to the right.
  • shoot left — the first enemy on the left is killed.
  • shoot right — the first enemy on the right is killed.

Every action has a cooldown of 1 second, so you cannot do the same action twice in a row. After your action, every enemy moves one space closer to you. Note that you cannot move right twice in a row, and you also cannot skip an action.

If at any point an enemy touches you, you die. Note that it is allowed to move outside the visible level (there are no enemies there).

You need to determine if it is possible to survive the level and kill all enemies, and if yes, output one possible way to do this.

Input

The first line contains one integer $$$t$$$ ($$$1 \leq t \leq 10^5$$$), the number of levels.

Each level consists of:

  • One string $$$s$$$ ($$$2 \leq |s| \leq 2 \cdot 10^5$$$) , the layout of the level.

The layout consists of 'X', '.', and '#' , your position, an empty field, and an enemy respectively. You are at exactly one position, and there is at least one enemy.

The sum over the length of all strings $$$s$$$ does not exceed $$$2 \cdot 10^5$$$.

Output

For each level, if it is possible to beat it, output "Yes". Otherwise, output "No".

If it is possible, output a string of length at most $$$3 \cdot |s|$$$, consisting of the letters 'L', 'R', and 'D', representing shooting left, shooting right, and moving right.

It can be shown that if there is a solution, there is one with at most $$$3 \cdot |s|$$$ actions.

Example
Input
5
#..X.#
#.#X.#
#X#
X.##.
.....##X
Output
Yes
RDL
Yes
LRL
No
Yes
RLRLRLRLRLRLRL
Yes
LDL
Note

This is one possible way to beat the first level of the sample:

#..X.# $$$\xrightarrow{\text{R}}$$$ #..X.. $$$\to$$$ .#.X.. $$$\xrightarrow{\text{D}}$$$ .#..X. $$$\to$$$ ..#.X. $$$\xrightarrow{\text{L}}$$$ ....X.

Here, the characters above the arrows correspond to the taken action. If there is nothing above an arrow, the enemies move.