A group of N high school students wants to play a basketball game. To divide themselves into two teams they first rank all the players in the following way:

Luckily there are no two players with both the same shot percentage and height so they are able to order themselves in an unambiguous way. Based on that ordering each player is assigned a draft number from the range [1..N], where the highest-rated player gets the number 1, the second highest-rated gets the number 2, and so on. Now the first team contains all the players with the odd draft numbers and the second team all the players with the even draft numbers.

Each team can only have P players playing at a time, so to ensure that everyone gets similar time on the court both teams will rotate their players according to the following algorithm:

The game has been going on for M minutes now. Your task is to print out the names of all the players currently on the field, (that is after M rotations).

Input

The first line of the input consists of a single number T, the number of test cases.

Each test case starts with a line containing three space separated integers N M P

The subsequent N lines are in the format "<name> <shot_percentage> <height>". See the example for clarification.

Constraints

1 ≤ T ≤ 50
2 * PN ≤ 30
1 ≤ M ≤ 120
1 ≤ P ≤ 5
Each name starts with an uppercase English letter, followed by 0 to 20 lowercase English letters.
There can be players sharing the same name.
Each shot percentage is an integer from the range [0..100].
Each height is an integer from the range [100..240].

Output

For each test case i numbered from 1 to T, output "Case #i: ", followed by 2 * P space separated names of the players playing after M rotations. The names should be printed in lexicographical order.

Example

In the first example if you sort all the players by their shot percentage you get the list: [Wai, Purav, Weiyan, Slawek, Lin, Meihong]. This makes the two teams:

[Wai, Weiyan, Lin]
[Purav, Slawek, Meihong]

The game starts with Lin and Meihong sitting on the bench in their respective teams. After the first minute passes it's time for Weiyan and Slawek to sit out since they have the highest draft numbers of the people who played. After the second minute passes Lin and Meihong will keep playing since they only played one minute so far and it's Wai and Purav who have to sit out.

Finally after the third minute Lin and Maihong go back to the bench and all the players currently playing again are:
Purav Slawek Wai Weiyan