Problem: You are given an array s consisting of n integers.

You have to find any array t of length k such that you can cut out maximum number of copies of array t from array s.

Cutting out the copy of t means that for each element t_i of array t you have to find t_i in s and remove it from s. If for some t_i you cannot find such element in s, then you cannot cut out one more copy of t. The both arrays can contain duplicate elements.

For example, if s = [1, 2, 3, 2, 4, 3, 1] and k = 3 then one of the possible answers is t = [1, 2, 3]. This array t can be cut out 2 times. 

  * To cut out the first copy of t you can use the elements [1, \underline{2}, 3, 2, 4, \underline{3}, \underline{1}] (use the highlighted elements). After cutting out the first copy of t the array s can look like [1, 3, 2, 4]. 
  * To cut out the second copy of t you can use the elements [\underline{1}, \underline{3}, \underline{2}, 4]. After cutting out the second copy of t the array s will be [4]. 



Your task is to find such array t that you can cut out the copy of t from s maximum number of times. If there are multiple answers, you may choose any of them.

Input

The first line of the input contains two integers n and k (1 ≤ k ≤ n ≤ 2 ⋅ 10^5) — the number of elements in s and the desired number of elements in t, respectively.

The second line of the input contains exactly n integers s_1, s_2, ..., s_n (1 ≤ s_i ≤ 2 ⋅ 10^5).

Output

Print k integers — the elements of array t such that you can cut out maximum possible number of copies of this array from s. If there are multiple answers, print any of them. The required array t can contain duplicate elements. All the elements of t (t_1, t_2, ..., t_k) should satisfy the following condition: 1 ≤ t_i ≤ 2 ⋅ 10^5.

Examples

Input


7 3
1 2 3 2 4 3 1


Output


1 2 3 


Input


10 4
1 3 1 3 10 3 7 7 12 3


Output


7 3 1 3


Input


15 2
1 2 1 1 1 2 1 1 2 1 2 1 1 1 1


Output


1 1 

Note

The first example is described in the problem statement.

In the second example the only answer is [7, 3, 1, 3] and any its permutations. It can be shown that you cannot choose any other array such that the maximum number of copies you can cut out would be equal to 2.

In the third example the array t can be cut out 5 times.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int dx4[] = {0, 0, -1, 1};
int dy4[] = {-1, 1, 0, 0};
int dx8[] = {0, 0, -1, 1, -1, -1, 1, 1};
int dy8[] = {-1, 1, 0, 0, -1, 1, -1, 1};
int knightx[] = {-1, 1, -2, 2, -2, 2, -1, 1};
int knighty[] = {-2, -2, -1, -1, 1, 1, 2, 2};
template <typename T>
T in() {
  char ch;
  T n = 0;
  bool ng = false;
  while (1) {
    ch = getchar();
    if (ch == '-') {
      ng = true;
      ch = getchar();
      break;
    }
    if (ch >= '0' && ch <= '9') break;
  }
  while (1) {
    if (ch < '0' || ch > '9') break;
    n = n * 10 + (ch - '0');
    ch = getchar();
  }
  return (ng ? -n : n);
}
template <typename T>
inline T POW(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * POW(B, P - 1);
  else
    return (POW(B, P / 2) * POW(B, P / 2));
}
template <typename T>
inline T Gcd(T a, T b) {
  if (a < 0) return Gcd(-a, b);
  if (b < 0) return Gcd(a, -b);
  return (b == 0) ? a : Gcd(b, a % b);
}
template <typename T>
inline T Lcm(T a, T b) {
  if (a < 0) return Lcm(-a, b);
  if (b < 0) return Lcm(a, -b);
  return a * (b / Gcd(a, b));
}
template <typename T>
T Bigmod(T base, T power, T MOD) {
  T ret = T(1) % MOD;
  while (power) {
    if (power & 1) ret = (ret * base) % MOD;
    base = (base * base) % MOD;
    power >>= 1;
  }
  return ret;
}
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
template <typename T>
long long isLeft(T a, T b, T c) {
  return (a.x - b.x) * (b.y - c.y) - (b.x - c.x) * (a.y - b.y);
}
template <typename T>
T ModInverse(T number, T MOD) {
  return Bigmod(number, MOD - T(2), MOD);
}
bool isConst(char ch) {
  if (isalpha(ch) && !isVowel(ch)) return true;
  return false;
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
bool isPrime(long long val) {
  if (val == 2) return true;
  if (val % 2 == 0 || val == 1) return false;
  long long sqrt_N = (long long)((double)sqrt(val));
  for (long long i = 3; i <= sqrt_N; i += 2) {
    if (val % i == 0) return false;
  }
  return true;
}
template <class T>
string convert(T _input) {
  stringstream blah;
  blah << _input;
  return blah.str();
}
bool valid(int r, int c, int x, int y) {
  if (x >= 1 && x <= r && y >= 1 && y <= c) return 1;
  return 0;
}
map<string, long long> month;
void Month() {
  month["January"] = 1, month["February"] = 2, month["March"] = 3,
  month["April"] = 4, month["May"] = 5, month["June"] = 6;
  month["July"] = 7, month["August"] = 8, month["September"] = 9,
  month["October"] = 10, month["November"] = 11, month["December"] = 12;
}
bool Check(int val, int pos) { return bool(val & (1 << pos)); }
int Set(int val, int pos) { return val | (1 << pos); }
int Reset(int val, int pos) { return val & (~(1 << pos)); }
int Flip(int val, int pos) { return val ^ (1 << pos); }
const long long maxn = 1e5 + 5;
long long n, m, t, caseno;
long long a[200005], k;
long long cnt[200005];
pair<long long, long long> b[200005];
set<long long> st;
set<long long>::iterator it;
vector<long long> ans;
bool Fun(long long lagbe) {
  long long i, tot = 0;
  for (i = n; i >= 1; i--) {
    tot += b[i].first / lagbe;
  }
  if (tot >= k) return 1;
  return 0;
}
int main() {
  long long t, i, j;
  n = in<long long>(), k = in<long long>();
  m = n;
  for (i = 1; i <= n; i++) {
    a[i] = in<long long>();
    cnt[a[i]]++;
    st.insert(a[i]);
  }
  long long d = st.size();
  i = 1;
  for (it = st.begin(); it != st.end(); it++) {
    b[i].first = cnt[*it];
    b[i].second = *it;
    i++;
  }
  n = i - 1;
  sort(b + 1, b + 1 + n);
  long long left = 1, right = m, mid, res;
  while (left <= right) {
    mid = left + ((right - left) >> 1);
    if (Fun(mid)) {
      res = mid;
      left = mid + 1;
    } else
      right = mid - 1;
  }
  long long now = 1;
  for (i = 1; i <= k; i++) {
    if (b[now].first >= res) {
      ans.push_back(b[now].second);
      b[now].first -= res;
    } else {
      now++;
      i--;
    }
  }
  for (i = 0; i < k; i++) {
    if (i) printf(" ");
    printf("%lld", ans[i]);
  }
  printf("\n");
  return 0;
}