410304: GYM104008 A Lily

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Lilytime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output - They serve the purpose of changing hydrogen into breathable oxygen, and they're as necessary here, as the air is on earth.

- But I still say, they're flowers.

- If you like.

- Do you sell them?

- I'm afraid not.

- But, maybe we can make a deal.

- What do you mean?

- Oh you see, you don't have to send them anywhere. I'll pay for them. But then, I'll leave them here, for you.

Assignment Outerspace, 1960

Everything that has a beginning has an ending. My journey has been reaching its ending, and I've been ready to say goodbye to my yesterday. But you, my dear friend, your journey is still thriving here at the 2022 CCPC Guilin Site. We sincerely hope you find a brand new milestone here, and forge ahead in the future with your love and passion.

Lily means a kind of beautiful flower. She usually only blooms once a year, so it could be very precious if you see a lily blooming. However, she is highly toxic to cats, so you must be aware of keeping curious cats away from lovely lilies.

You have $$$n$$$ grids of soil land in a row, for $$$1$$$ to $$$n$$$, some with lilies blooming. We don't want to hurt lilies, as well as cats. You can put some cat food on the grids, but for any grid $$$i$$$ with cat food, grids with indices falling in the range $$$[i - 1, i + 1]$$$ must not contain lily flowers. You love cats and lilies, so you want to maximize the number of grids having cat food.

Design a plan to fulfill the above requirements.

Input

There's a single integer $$$n~(1 \leq n \leq 1\,000)$$$ in the first line, denoting the number of grids.

The second line contains a string $$$R$$$ consisting of only 'L' and '.', denoting the grids with and without lilies.

Output

The output contains a single line with string $$$R'$$$ consisting of only 'L', '.' and 'C', where 'C' means the cat food you assigned to the empty grids in $$$R$$$ while fulfilling the above requirements.

If there are multiple solutions, print any.

ExamplesInput
5
..L..
Output
C.L.C
Input
2
..
Output
CC

加入题单

算法标签: