At first, the pieces are on Squares 11, 33, and 44. The operations are performed against them as follows:
-
The 33-rd piece from the left is on Square 44. This is not the rightmost square, and the next square on the right does not contain a piece, so move the 33-rd piece from the left to Square 55. Now, the pieces are on Squares 11, 33, and 55.
-
The 33-rd piece from the left is on Square 55. This is the rightmost square, so do nothing. The pieces are still on Squares 11, 33, and 55.
-
The 11-st piece from the left is on Square 11. This is not the rightmost square, and the next square on the right does not contain a piece, so move the 11-st piece from the left to Square 22. Now, the pieces are on Squares 22, 33, and 55.
-
The 11-st piece from the left is on Square 22. This is not the rightmost square, but the next square on the right (Square 33) contains a piece, so do nothing. The pieces are still on Squares 22, 33, and 55.
-
The 22-nd piece from the left is on Square 33. This is not the rightmost square, and the next square on the right does not contain a piece, so move the 22-nd piece from the left to Square 44; Now, the pieces are still on Squares 22, 44, and 55.
Thus, after the QQ operations have ended, the pieces are on Squares 22, 44, and 55, so 22, 44, and 55 should be printed in this order, with spaces in between.