Consider an integer sequence a1,a2,…,an. A strictly increasing sequence of indices c1,c2,…,cp (with 1≤ci≤n) is called declining if the values at those positions strictly decrease, that is ac1>ac2>⋯>acp.
A sequence of indices c1,c2,…,cp is lexicographically smaller than a sequence d1,d2,…,dp if there is some position k∈[1,p] such that ci=di for every i∈[1,k−1] and ck<dk.
Answer several queries of the form: find the lexicographically k-th smallest declining sequence of indices. Every declining sequence considered has length exactly p.
The first line contains three integers n, p, and q (1≤n,q≤100000, 1≤p≤10): the length of the sequence, the length of the declining sequences to consider, and the number of queries. The second line contains n integers ai (−109≤ai≤109). Each of the next q lines contains one integer kj (1≤kj≤1018).
Print q lines. The j-th line contains the kj-th smallest declining sequence of indices, written as its p index values separated by single spaces, or a single number −1 if that declining sequence does not exist.
For the first example (n=5 and the sequence −1 6 5 2 1), the declining sequences of indices of length 3, in lexicographic order, are (2,3,4), (2,3,5), (2,4,5), and (3,4,5).