#abc299g. [abc299_g]Minimum Permutation

[abc299_g]Minimum Permutation

Problem Statement

We have a sequence AA of length NN consisting of integers between 11 and MM. Here, every integer from 11 to MM appears at least once in AA.

Among the length-MM subsequences of AA where each of 1,ldots,M1, \\ldots, M appears once, find the lexicographically smallest one.

Constraints

  • 1leqMleqNleq2times1051 \\leq M \\leq N \\leq 2 \\times 10^5
  • 1leqAileqM1 \\leq A_i \\leq M
  • Every integer between 11 and MM, inclusive, appears at least once in AA.
  • All values in the input are integers.

Input

The input is given from Standard Input in the following format:

NN MM A1A_1 A2A_2 ldots\\ldots ANA_N

Output

Let B1,ldots,BMB_1, \\ldots, B_M be the sought subsequence, and print it in the following format:

B1B_1 B2B_2 ldots\\ldots BMB_M


Sample Input 1

4 3
2 3 1 3

Sample Output 1

2 1 3

The length-33 subsequences of AA where each of 1,2,31, 2, 3 appears once are (2,3,1)(2, 3, 1) and (2,1,3)(2, 1, 3). The lexicographically smaller among them is (2,1,3)(2, 1, 3).


Sample Input 2

4 4
2 3 1 4

Sample Output 2

2 3 1 4

Sample Input 3

20 10
6 3 8 5 8 10 9 3 6 1 8 3 3 7 4 7 2 7 8 5

Sample Output 3

3 5 8 10 9 6 1 4 2 7