#P7876. Task Scheduler

Task Scheduler

Task Scheduler

Problem Description

ByteCompany has a server cluster with mm workers, kk of which are somehow disconnected. The task scheduler have just received nn tasks, and the ii-th task needs to be executed on tit_i workers. For an executive order of p1,p2,pnp_1 ,p_2 , \ldots p_n, the task scheduler will assign workers for them respectively. Specifically, for the ii-th task pip_i, the scheduler will select tpit_{p_i} workers randomly from all workers which hasn't been assigned tasks at this moment. Each of those free workers share a universal equal probability to be selected. Note that disconnected workers may also be selected. In this scenario, the current scheduling will be considered as a failure and retry automatically and immediately. Only when the scheduling of the current task is successful, the next task will be proceeded. Now you need to find an optimal executive order of p1,p2,pnp_1 ,p_2 , \ldots p_n to minimize the expected amount of the scheduling process. We guarantee that the amount of connected workers is enough to finish all scheduling.

Input

The input contains several test cases, and the first line contains a single integer TT (1T1001 \le T \le 100), the number of test cases. For each test case, the first line contains three integers nn (1n1001 \le n \le 100), mm (nm10000n \le m \le 10\,000) and kk (0kmn0 \le k \le m - n): the number of tasks, the total number of workers and the number of disconnected workers. The following line contains nn positive integers t1,t2,t3,,tnt_1, t_2, t_3, \ldots, t_n (ni=1ntimkn \le \sum_{i=1}^{n}t_i \le m - k), describing the number of needed worker for each task.

Output

For each test case, output nn integers p1,p2,,pnp_1 ,p_2 , \ldots, p_n on a single line representing the order of tasks to be scheduled. If there are multiple solutions, output the lexicographically smallest one.

Sample Input

2
2 4 1
1 2
3 3 0
1 1 1

Sample Output

2 1
1 2 3

Source

2020 Multi-University Training Contest 10