Looking for a Subset GivenasetS={a,a,a,...,a},youhavetofindasubsetofS,P={a ,a ,a ,...,a }such

123 n x1x2x3 xm that (x1 < x2 < ... < xm) and (ax1 < ax2 < ... < axm). If there are several subsets possible then you should find the subset where x1 is minimum. If there is still a tie then check for the lowest x2 and so on. Input The input file contains several sets of inputs. The total number of test cases will be less than 25. The description of each set is given below: Each case starts with two integers n (1 ≤ n ≤ 10000) and q (1 ≤ q ≤ 100), q is the number of queries. The next line contains n integers (seperated by a space) denoting a1, a2, a3, . . . , an respectively. And the next q lines, each contains an integer denoting m (1 ≤ m ≤ n). There is no number in the input file that contains more than 8 digits. The input will be terminated by the case where n = q = 0. And this case should not be processed. Output For each case in the input, you should first print the case number starting from 1. Then for each query first print the query number starting from 1. And for each m you have to find the result. If there exists a subset as described above you should print the elements of the subset in a single line. The numbers should be seperated by a space. Otherwise print ‘Impossible’ without the quotes. See the sample input-output for more details. Output should be formatted like the sample output. Notes:

  1. The output for the first sample case should be: (replacing every space by a ‘.’) Set.1: ..Subset.1: ....Impossible ..Subset.2: ....1.2.3.6 ..Subset.3: ....Impossible
  2. You are advised not to use cin and cout for this problem. Sample Input 63 341236 6 4 5 62

11031 – Looking for a Subset 2/2 246135 3 4 00 Sample Output Set 1: Subset 1: Impossible Subset 2: 1236 Subset 3: Impossible Set 2: Subset 1: 246 Subset 2: Impossible