Declining Sequences

No attempts yetTime limit1sMemory limit128 MB

Problem

Consider an integer sequence a1,a2,,ana_1, a_2, \ldots, a_n. A strictly increasing sequence of indices c1,c2,,cpc_1, c_2, \ldots, c_p (with 1cin1 \le c_i \le n) is called declining if the values at those positions strictly decrease, that is ac1>ac2>>acpa_{c_1} > a_{c_2} > \cdots > a_{c_p}.

A sequence of indices c1,c2,,cpc_1, c_2, \ldots, c_p is lexicographically smaller than a sequence d1,d2,,dpd_1, d_2, \ldots, d_p if there is some position k[1,p]k \in [1, p] such that ci=dic_i = d_i for every i[1,k1]i \in [1, k-1] and ck<dkc_k < d_k.

Answer several queries of the form: find the lexicographically kk-th smallest declining sequence of indices. Every declining sequence considered has length exactly pp.

Input

The first line contains three integers nn, pp, and qq (1n,q1000001 \le n, q \le 100\,000, 1p101 \le p \le 10): the length of the sequence, the length of the declining sequences to consider, and the number of queries. The second line contains nn integers aia_i (109ai109-10^9 \le a_i \le 10^9). Each of the next qq lines contains one integer kjk_j (1kj10181 \le k_j \le 10^{18}).

Output

Print qq lines. The jj-th line contains the kjk_j-th smallest declining sequence of indices, written as its pp index values separated by single spaces, or a single number 1-1 if that declining sequence does not exist.

Note

For the first example (n=5n=5 and the sequence 1 6 5 2 1-1\ 6\ 5\ 2\ 1), the declining sequences of indices of length 33, in lexicographic order, are (2,3,4)(2, 3, 4), (2,3,5)(2, 3, 5), (2,4,5)(2, 4, 5), and (3,4,5)(3, 4, 5).