Basic

26.88%

Given an array of size n, the goal is to find out the smallest number that is repeated exactly ‘k’ times.

**Input:**

First line consists of T test cases. First line of every test cases consists of 2 integers N and K. Second line of consists of every test case consists of array elements

**Output:**

Single line output, print the smallest number to be reapeted k times, else print -1.

**Constraints:**

1<=T<=100

1<=N<=1000

**Example:
Input:**

2

5 2

1 2 2 1 1

5 2

1 1 1 2 3

2

-1