You are given n integers and a number k. Rank the distinct values by how many times they appear in the array: a value with a higher count ranks earlier, and when two values have the same count the smaller value ranks earlier. This ordering is a strict total order, so the ranking is unique.
Output the first k values in this ranking.
Input format
Line 1: two integers n and k.
Line 2: n space-separated integers, the array.
Output format
One line: the top k values in the described order, space-separated.
Constraints
- 1 <= n <= 100000
- 1 <= k <= number of distinct values in the array
- -1000000000 <= each value <= 1000000000