The chef is preparing m dishes, and each dish uses k grams of ingredients. As a result, the chef has bought n ingredients, and the ingredients are numbered 1,2,…,n. The i-th ingredient weighs d_i grams. The sum of weights of all n ingredients is exactly m×k grams. d_i and k are positive integers.
An ingredient may be used in multiple dishes. However, each dish may use at most 2 ingredients. Now you are asked to decide if there exists a valid way to prepare the m dishes. More formally, the final plan shall satisfy the following requirements:
If there exists a feasible solution, you should output a detailed plan.
In this problem, each test case may have multiple instances. The first line is an integer T denoting the number of instances. For each instance, the first line contains three positive integers n,m,k denoting the number of ingredients, the number of dishes to prepare, and the amount of ingredients each dish uses. The second line contains n integers, and the i-th integer denotes there are a_i grams of ingredient i.
For each instance, if there is no feasible solution, output -1. Otherwise, you need to output m lines, and each line specifies the way to prepare a dish. Depending on the number of ingredients used in the dish, a line shall be in one of the following two formats:
Your answer will be checked by a special judge. Therefore, if there are multiple feasible solutions, you may print any solution. You should make sure the output is in the correct format, and two adjacent integers in a line are separated by a single space. Finally, your output shall not contain any extra characters.
1≤T≤10, 1≤n≤500, n−2≤m≤5000, m≥1, 1≤k≤5000, ∑_i=1nd_i=m×k.