Restaurant Orders

No attempts yetTime limit1sMemory limit256 MB

Problem

A friend of yours who works as a waiter has a problem. A group of xkcd fans has started coming to the restaurant and ordering food the way the comic strip below does. Working out a single order takes him a long time, so write a program that does it for him.

Figure G.1: Comic strip xkcd.com/287.

You are given the price of every item on the menu and the total cost of one order. Find out what was ordered. An order may contain the same item several times. Two menu items may have the same price, and they still count as different items, so two orders that differ only in which item was picked are different orders.

Input

The first line contains one integer nn (1n1001 \le n \le 100), the number of items on the menu. The second line contains nn space separated positive integers c1,c2,,cnc_1, c_2, \dots, c_n, the price of each item on the menu in Swedish kronor. No item costs more than 1000 kronor.

The third line contains mm (1m10001 \le m \le 1000), the number of orders placed. The fourth line contains the mm orders. Each order is given as an integer ss (1s300001 \le s \le 30000), the total cost of all items in that order.

Output

For each order print one line. If exactly one order gives the specified total cost, print the numbers of the items on that order in ascending order, separated by single spaces. If the order contains the same item more than once, print its number as many times as it occurs. The first item on the menu has number 1, the second has number 2, and so on.

If no order gives the specified total, print Impossible. If more than one order gives the specified total, print Ambiguous.