Numbers arrive one at a time and are added to a growing collection. After each addition, report the k-th largest value currently in the collection (counting duplicates by position). If fewer than k numbers have been added so far, report the token - instead.
Input format
Line 1: two integers k and q, where q is the number of additions.
Line 2: q space-separated integers, the numbers in arrival order.
Output format
q space-separated tokens on one line: after each addition, the current k-th largest value, or - if fewer than k numbers exist.
Constraints
- 1 <= k <= 100000
- 1 <= q <= 100000
- -1000000000 <= each number <= 1000000000