SSC is a super computer designed in Sharif University having 2 ``master" and n
Because of the dependencies between different parts of the software, many messages should be exchanged between processors. A very fast network is needed to minimize the message passing overhead. To optimize the network, a clique structure will be constructed in which there is a direct communication cable between each pair of processors.
There are two different cables: blue cables which can transmit up to 100 Megabits per second and red cables which can transmit up to 1 Gigabits per second. Each pair of slave processors will be connected by one blue cable. Due to the higher communication volume on master processors, the two masters are connected by one red cable and also each master is connected to each slave by another red cable.
SSC is thus made of n + 2
The cooling system has forced us to put the two master motherboards in the lowest and highest shelves of the rack. We assume that the master in the bottom has height 0, and the heights of the other motherboards are integers higher than 0. You, as a computer engineer, are asked to do the final assembly of SSC. You are given the empty rack box, the ready motherboards, and your job is to determine whether you can put the boards in the rack that satisfy the constraints and cable lengths.
There are exactly 2n + 1
There are multiple test cases in the input. The first line of each test case contains two numbers n
For each data set you should write n + 1
Input
Output
Sample Input
3 3
3 7 7 10 10 14 17
3 4 7
3 3
3 7 7 10 10 14 17
3 4 8
0 0
Sample Output
17 3 7 10
Impossible