You are given an array a, consisting of n integers. We defifine an operation as follows:
Select k integers in the array a, remove them and append the sum of them at the end of the array.
An array A is lexicographically larger than an array B (of the same length) if in the fifirst position where A and B differ, A has a number greater than the corresponding number in B. For example, [0, 1, 14, 0] is lexicographically larger than [0, 1, 5, 6], because the fifirst position they differ in is at the third number, and 14 is greater than 5. Lexicographically largest array means the array is lexicographically larger than any other arrays of the same length.
Please print the lexicographically largest array after performing given operations p times.
输入描述:
The fifirst line contains one integer t(1 ≤ t ≤ 105 ) — the number of test cases.
The fifirst line of each test case contains three integers n, k and p (2 ≤ n ≤ 3·105 , 2 ≤ k ≤ n,(k−1)·p < n) — the length of the array a, the number of integers to select, and the operation times.
The second line contains n integers a1, a2, . . . , an (1 ≤ ai ≤ 109 ) — the array a mentioned above.
It is guaranteed that the sum of n over all test cases does not exceed 3 · 105 .
输出描述:
For each test case, print one line, containing the result array — the lexicographically largest array.
示例1
输入
复制
3
5 2 1
1 2 3 4 5
5 2 2
1 2 3 4 5
5 2 3
1 2 3 4 5