Today, Fallleaves01 and his

friends went out for dinner. They intend to order a total of

dishes. To ensure everyone gets their favorite dish, they decided to
take turns ordering one dish each in sequential order(i.e., 1st person, 2nd person, ...,

-th person, 1st person, ...) and repeat until they have ordered a total of

dishes.
Please be aware that
the dishes ordered by one person can be shared and tasted by everyone. To ensure a wide variety of flavors and experiences, it is important for individuals to
avoid ordering the same dish multiple times.
There are a total of

dishes available for selection. Everyone knows each person's preferences for every dish. This information is represented by an

matrix called

, where

denotes the degree to which the

-th person likes the

-th dish.
Assume that each person only cares about their own enjoyment of the dishes without considering others. In other words,if they ultimately choose dishes

, person

aims to maximize

.
We also found that for every different

.
Fallleaves01 is curious to know what dishes will be on the table if everyone makes optimal decisions.
输入描述:
The input consists of multiple test cases. The first line of each test case contains an integer
, indicating the number of test cases. The following lines describe each test case.
For each test case, the first line contains three integers
,
, and
(
). These represent the number of people, the number of dishes, and the number of dishes planned to be ordered, respectively.
The next
lines contain
integers per line. The
-th number on the
-th line represents the degree to which the
-th person likes the
-th dish, denoted as
(
).
It is guaranteed that the sum of
and the sum of
do not exceed
.
输出描述:
For each test case, output a row of
integers in increasing order, representing the final selected dishes.
示例1
输入
复制
3
3 4 2
3 2 1 4
3 1 2 4
1 2 3 4
3 4 3
1 2 3 4
3 1 2 4
1 3 2 4
3 20 10
12 25 24 2 23 1 7 17 10 13 9 4 30 29 11 20 14 27 19 18
9 1 22 26 15 16 11 29 18 24 3 21 25 6 19 7 14 13 17 28
26 27 16 2 17 20 12 4 3 1 24 19 9 28 8 18 15 29 13 22
输出
复制
1 4
1 3 4
1 2 3 4 5 8 13 14 18 20
备注:
In case 2:
The 1st person chooses the 3rd dish.
The 2nd person chooses the 1st dish.
The 3rd person chooses the 4th dish.