#T353. 黑白棋子的移动

黑白棋子的移动

Description

There are 2n chess pieces (n ≥ 4) arranged in a row. The initial position has all white pieces on the left and all black pieces on the right. For example, when n = 5, the arrangement is:
○○○○○●●●●●
The rule for moving the pieces is: Each time, you must move two adjacent pieces simultaneously (either color is allowed), either to the left or right into an empty space, but you cannot swap the left-right positions of the two pieces. Each move must skip over several pieces (no sliding allowed). The goal is to rearrange the pieces into an alternating black-and-white sequence. For example, when n = 5, the final arrangement should be:
○●○●○●○●○●
Task: Write a program to print the moving process.

Input Format

Input n.

Output Format

The moving process.

7

step 0:ooooooo\*\*\*\*\*\*\*--
step 1:oooooo--\*\*\*\*\*\*o\*
step 2:oooooo\*\*\*\*\*\*--o\*
step 3:ooooo--\*\*\*\*\*o\*o\*
step 4:ooooo\*\*\*\*\*--o\*o\*
step 5:oooo--\*\*\*\*o\*o\*o\*
step 6:oooo\*\*\*\*--o\*o\*o\*
step 7:ooo--\*\*\*o\*o\*o\*o\*
step 8:ooo\*o\*\*--\*o\*o\*o\*
step 9:o--\*o\*\*oo\*o\*o\*o\*
step10:o\*o\*o\*--o\*o\*o\*o\*
step11:--o\*o\*o\*o\*o\*o\*o\*