First element occurring k times in an array#802

First element occurring k times in an array

1 second
128 megabytes
Easy (≈1000)

Given an array of n integers. Find the first element that occurs k number of times. If no element occurs k times, print -1.

Input

The first line contains numbers n and k (n, k ≤ 10^5). Second line contains n integers, each no more than 10^9 by absolute value.

Output

Print the first element that occurs k times. If no element occurs k times, print -1.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading