P15004 [HackerEarth] Gru and minions are playing with numbers. Gru gives a list of numbers to a minion and asks him to tell the minimum possible last number of a non decreasing sequence of length L.
普及
题目描述

Gru and minions are playing with numbers. Gru gives a list of numbers to a minion and asks him to tell the minimum possible last number of a non decreasing sequence of length L.

Input: Input consists of number of test cases T. Each test case contains size of array i.e N. Next line contains N space separated elements of array. Next line contains length of the non decreasing sequence i.e. L.

Output: You have to print the minimum possible last number of a sequence and if their is no non-decreasing sequence of length L, then print "-1" without the quotes.

Constraints: 1 ≤ T ≤ 100 | 1 ≤ N ≤ 106 | 1 ≤ a[i] ≤ 106 | 1 ≤ L ≤ N

SAMPLE INPUT
1
7
9 7 2 5 4 11 12
3

SAMPLE OUTPUT
11

Explanation

In sample input, possible non-decreasing sequences of length L=3 are
(9,11,12) , (7,11,12) , (2,5,11) , (2,4,11) , (2,5,12) , (2,4,12) , (2,11,12) , (5,11,12) , (4,11,12)
and the minimum last number is 11 for the sequences (2,5,11) and (2,4,11). Hence, the answer is 11.

输入格式

见题面

输出格式

见题面

样例输入
10 11 67 34 0 69 24 78 58 62 64 5 45 6 27 61 91 95 42 27 36 91 4 2 53 92 82 21 16 18 95 47 26 71 38 69 12 67 99 35 94 3 25 2 33 73 1 21 11 53 68 47 44 62 57 37 59 23 41 29 78 16 35 90 42 88 6 40 42 8 28 46 5 90 29 70 50 6 1 93 48 29 23 84 54 56 40 66 76 31 8 44 39 26 23 37 38 18 82 26 11 33 15 39 58 4 30 77 6 73 86 21 3 14 72 70 29 77 73 97 12 86 90 61 36 55 67 55 7 11 52 50 50 41 24 66 30 7 91 7 37 3 17 53 83 45 9 9 58 21 88 22 46 6 30 13 68 0 91 62 7 10 59 24 37 48 83 95 41 2 50 91 7
样例输出
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1