Xiaoqian, member of our ACM team, wanted to invite us to her home and enjoy a dinner. Her mum gave her M Yuan. Now it’s time to order dishes. There are N people here. Each has a chance to order one dish, Xiaoqian first, then everyone else (until the last one or no more money to order any dish). No dish could be ordered twice. Now Xiaoqian wants to minimize the fee and we want to maximize the fee (not larger than M). Can you help Xiaoqian to choose the first dish so that the possible maximum fee is minimized?
First line contains only one integer C, the number of test case. For each test case, first line contains three integers N, M and D. D is the number of dishes offered. Then D lines followed, prices of each dish, none of them larger than 100. (0<N≤200, 0<M≤10000, 0≤D≤100)
Output one integer per line for each test case: the minimum maximum fee.
1 5 10 6 3 2 2 2 2 2
9