CF746G New Roads
Description
There are $ n $ cities in Berland, each of them has a unique id — an integer from $ 1 $ to $ n $ , the capital is the one with id $ 1 $ . Now there is a serious problem in Berland with roads — there are no roads.
That is why there was a decision to build $ n-1 $ roads so that there will be exactly one simple path between each pair of cities.
In the construction plan $ t $ integers $ a_{1},a_{2},...,a_{t} $ were stated, where $ t $ equals to the distance from the capital to the most distant city, concerning new roads. $ a_{i} $ equals the number of cities which should be at the distance $ i $ from the capital. The distance between two cities is the number of roads one has to pass on the way from one city to another.
Also, it was decided that among all the cities except the capital there should be exactly $ k $ cities with exactly one road going from each of them. Such cities are dead-ends and can't be economically attractive. In calculation of these cities the capital is not taken into consideration regardless of the number of roads from it.
Your task is to offer a plan of road's construction which satisfies all the described conditions or to inform that it is impossible.
Input Format
N/A
Output Format
N/A