Under construction

Still being built. Things may change

Supermarket

Time limit1sMemory limit128 MB

Summary
Find the k-th smallest value among n amounts spent, with values bounded by 100000.
Level

Easy3 of 10

Topics
Sorting, Array, Brute force, Math
Solved
No attempts yet

Problem

A supermarket is running a promotion. Throughout the day, each customer spends some amount of money in the store. At the end of the day, the store draws a number kk and sends a prize to the customer who spent the kk-th smallest amount that day (counting the amounts from smallest to largest). The amounts spent by customers need not be distinct, but your task is simply to find the value of the kk-th smallest amount spent that day.

Input

The first line contains the number of test cases dd (1≤d≤1001 \le d \le 100).

The first line of each test contains the number of customers nn who visited the store that day and the number kk (1≤n≤1061 \le n \le 10^6; 1≤k≤n1 \le k \le n). The second line contains nn integers denoting the amounts spent by the customers in order. Each amount is an integer between 11 and 10510^5, inclusive.

Output

For each test, print the value of the kk-th smallest amount spent that day, one per line.

Examples1

  1. Example 1

    Input
    2
    5 3
    3 4 2 2 2
    5 5
    3 4 2 2 2
    
    Expected output
    2
    4