Time limit
1s
Memory limit
128 MB
Eggs are divided among four baskets. One unit operation works as follows.
Starting from the initial state, print the basket states in order until all eggs are gathered in one basket. The number of unit operations should be as small as possible, and the given value K is the benchmark operation count used for judging.
The first line contains the benchmark number of unit operations K. The second line contains four integers separated by spaces: the numbers of eggs in the four baskets. The total number of eggs is between 4 and 3000, inclusive.
On the first line, print the initial basket state in the same format as the input. On each following line, print the basket state after one unit operation. The last line must be a state where all eggs are gathered in one basket. The number of unit operations you print is the number of state lines after the first line.