Given a list of ~N~ positive integers, none larger than ~K~, compute the lexicographically smallest permutation of the first ~K~ positive integers that is a subsequence of the list.
~1 \le K \le N \le 2 \cdot 10^5~
Each integer from ~1~ to ~K~ appears at least once in the list.
The first line contains two space-separated integers ~N~ and ~K~. Each of the next ~N~ lines contains a single integer, the integers of the list in order.
Output ~K~ space-separated integers, the lexicographically smallest permutation that is a subsequence.
6 3 3 2 1 3 1 3
2 1 3