1

**Examples**

**Example 1**

**Input**

3

2

6 13

3

20 7 10

1

4

**Output**

4 6 10

7 13

20

**Explanation**

There are 3 bags.

First bag contains 2 goods of weights 6kg, 13kg.

Second bag contain 3 goods of weights 20kg, 7kg, 10kg.

Third bag contains 1 goods of weight 4kg.

Bag1 = [6, 13] => total weight = 19kg

Bag2 = [20, 7, 10] => total weight = 37kg

Bag3 = [4] => total weight = 4kg

Step 1: swap goods of weight 6kg from bag1 and goods of weight 7kg from bag2.

Bag1 = [7, 13] => total weight = 20kg

Bag2 = [20, 6, 10] => total weight = 36kg

Bag3 = [4] => total weight = 4kg

Step 2: swap goods of 20kg from bag1 and goods of 4kg from bag3.

Bag1 = [7, 13] => total weight = 20kg

Bag2 = [4, 6, 10] => total weight = 20kg

Bag3 = [20] => total weight = 20kg

Weights of bags are now equalized to 20kg.

Now we need to print the contents of each bag. For that, first sort the goods in the non-decreasing order as below:

Bag1 = [7, 13]

Bag2 = [4, 6, 10]

Bag3 = [20]

Least weighted good is 4kg and its in Bag2. So, print Bag 2 contents in first line.

Next least weighted goods in the remaining bags is 7kg and its in Bag1. So, print contents of Bag1 in the second line.

Finally, print the contents of Bag3 on line 3.