Three of the trouble-makers went to Malaysia this year. A rest-house was reserved for them. Unlike regular rest-houses, this was a duplex house and had a kitchen with lots of ingredients.
None of them had any previous cooking experience, but they became very excited and planned to cook so many delicious meals! Ideas were coming from their minds like rains from clouds. So, they went to the supermarket and bought a lot of grocery items for their great recipes. For example, they bought 20 eggs. The excited trouble-makers returned to the rest house and found out that the gas stove was not connected to the gas cylinder. Then, they became very anxious as it was not possible for them to connect such a complex thing and the grocery items might get ruined. But luckily, the microwave oven works. So, they tried to boil all the eggs using the microwave oven (maybe, the first time in history)! And they succeeded in boiling the eggs!
Now they have n eggs and a bowl. They put some eggs in the bowl with some water. And after that, they put the bowl into the oven to boil the eggs. It's risky to put more than P eggs in the bowl and the bowl can carry at most Q gm of eggs. It takes 12 minutes to boil a bowl of eggs. Now you are given the weight of the eggs in gm, and the trouble-makers have exactly 12 minutes in their hand. You have to find the maximum number of eggs they can boil without taking any risk.
Input
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case starts with three integers n (1 ≤ n ≤ 30), P (1 ≤ P ≤ 30) and Q (1 ≤ Q ≤ 30). The next line contains n positive integers (not greater than 10) in non-descending order. These integers denote the weight of the eggs in gm.
Output
For each case, print the case number and the desired result.
Sample
Sample Input | Sample Output |
---|---|
2 3 2 10 1 2 3 4 5 5 4 4 5 5 | Case 1: 2 Case 2: 1 |