URI Online Judge | 3041

Articles Distribution

Por Gerson Groth, URI BR Brazil

Timelimit: 1

The Organizers of the conference STIN (Technology and Innovation Symposium of Nlogonia) need to distribute the submitted articles among reviewers. Each reviewer has a limited time to review so each has reported the maximum number of articles they can review. Your task is to calculate how many articles each reviewer will review. Since no reviewer has links to submitted articles, there is no restriction as to which article they can receive. To make it even easier, each article will be evaluated by only one reviewer. The only restriction you should be concerned about is the limit of articles each one can review.

The distribution of the articles is performed as follows:

Input

the input consists of several test cases. Each test case starts with a integer number N (2 <= N <= 100), indicating the number of reviwers. The next N lines contains, each one, the number of articles P the reviewer can evaluate (0 <= P <= 100). Finally, a single line containing an integer A (0 <= A <= 1000) indicates the number of articles submitted to the conference.

The end of the input is given by N = 0.

Output

The output should contain the number of articles each reviewer will evaluate, one per line, sorted by the number of articles (descending order).

If articles cannot be distributed to all reviewers, write "Impossible" in one line.

Input Sample Output Sample

3

2

7

5

10

2

1

2

1

2

1

1

10

0

4

4

2

1

0

Impossible