Donghyuk has five wooden pieces, each labeled with one of the numbers from 1 to 5. Every number appears on exactly one piece. He wants to arrange the pieces in the order 1 2 3 4 5 by repeatedly performing the following process.
1 2 3 4 5, go back to step 1.Given the initial order of the pieces, print the order of the pieces every time a swap is made.
The first line contains the five numbers on the pieces in their current order.
Each number is between 1 and 5 inclusive, no number appears more than once, and the initial order is not 1 2 3 4 5.
Whenever two pieces are swapped, print one line containing the order of the pieces after that swap.