SP27321 NDS - Increasing numbers
Description
Subham and Dewang both are playing with numbers. Subham gives Dewang an array of numbers and asks him to tell the minimum possible last number of a increasing sequence of length **L**.
**Note:** Check the sample I/O for more clarity.
Input Format
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 increasing sequence i.e. **L**.
Output Format
You have to print the minimum possible last number of a sequence and if their is no increasing sequence of length **L**, then print "-1" without the quotes.