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 JAVA):

Solution:
import javafx.util.Pair;

import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.*;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(System.out);
        Main mm = new Main();
        mm.problemD(new Input(new BufferedReader(new InputStreamReader(System.in))), out);
        out.close();
    }

    static void problemE(Input in, PrintWriter out) throws IOException {
        int n=in.nextInt();
        HashMap<Integer,Integer> t=new HashMap<>();
        for (int i = 0; i < n; i++) {
            int a=in.nextInt();
            if(t.containsKey(a)){
                int tt=t.get(a);
                t.replace(a,tt+1);
            }else{
                t.put(a,1);
            }
        }
        ArrayList<Integer> ar=new ArrayList<Integer>(t.values());
        ar.sort(Comparator.reverseOrder());
        int m=ar.size();
        int mx=0;
        int[] pw=new int[20];
        pw[0]=1;
        for (int i = 1; i < 20; i++) {
            pw[i]=pw[i-1]<<1;
        }
        for (int i = 1; i <= Math.min(m,19) ; i++) {
            int x=1000000000;
            for (int j = 0; j < i; j++) {
                int d=ar.get(j)/pw[i-j-1];
                if(x>d)x=d;
            }
            int r=x*(pw[i]-1);
            if(mx<r)mx=r;
        }
        out.println(mx);
    }

    static void problemD(Input in, PrintWriter out) throws IOException {
        /*for (int i = 0; i < 100000; i++) {
            out.print("1 ");
        }for (int i = 0; i < 100000; i++) {
            out.print(2+i);
            out.print(' ');
        }
        out.println();
        out.flush();*/
        int n=in.nextInt(),k=in.nextInt(),s;
        int[] a=new int[200000+1];
        for (int i = 0; i < n; i++) {
            s=in.nextInt();
            a[s]++;
        }
        ArrayList<Pair<Integer,Integer>> b=new ArrayList<>();
        for (int i = 1; i <= 200000 ; i++) {
            if(a[i]!=0){
                b.add(new Pair<>(a[i],i));
            }
        }
        b.sort((o1, o2) -> {return o2.getKey()-o1.getKey();});
        int m=b.size();
        int[] p=new int[m];
        int pred=-1;
        for (int i = n/k; i >0 ; i--) {
            int sm=0;
            for (int j = 0; j < m; j++) {
                int t=b.get(j).getKey()/i;
                p[j]=t;
                sm+=t;
            }
            if(sm>=k){
                sm=0;
                for (int j = 0; sm < k; j++) {
                    int el=b.get(j).getValue();
                    for(int t=0;t<Math.min(p[j],k-sm);t++) {
                        out.print(el);
                        out.print(' ');
                    }
                    sm+=p[j];
                }
                return;
            }else{
                if(sm==pred){
                    int mx=-1;
                    for (int j = 0; j < m; j++) {
                        int t=b.get(j).getKey()/(p[j]+1);
                        if(t>mx){
                            mx=t;
                        }
                    }
                    i=mx+1;
                }else{
                    pred=sm;
                }
            }
        }
    }

    static void problemC(Input in, PrintWriter out) throws IOException {
        int n=in.nextInt(),mx1=-1,mx2=-2,t,i1=-1,i2=-1,k=0;
        long s=0;
        int []a=new int[n];
        for (int i = 0; i < n; i++) {
            a[i]=in.nextInt();
            s+=a[i];
            if(mx1<a[i]){
                mx1=a[i];
                i1=i;
                if(mx2<mx1){
                    t=mx1;mx1=mx2;mx2=t;
                    t=i1;i1=i2;i2=t;
                }
            }
        }
        ArrayList<Integer> b=new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if(i==i2){
                if(s-a[i]==2*mx1){
                    k++;
                    b.add(i);
                }
            }else{
                if(s-a[i]==2*mx2){
                    k++;
                    b.add(i);
                }
            }
        }
        out.println(k);
        for (int i = 0; i < k; i++) {
            out.print(b.get(i)+1);
            out.print(' ');
        }
    }

    static void problemB(Input in, PrintWriter out) throws IOException {
        int n=in.nextInt(),pred=-2,k=0;
        int []a=new int[n];
        for (int i = 0; i < n; i++) {
            a[i]=in.nextInt();
        }
        for (int i = 1; i < n-1; i++) {
            if(a[i]==0&&a[i-1]==1&&a[i+1]==1){
                if(pred+2==i) {
                    pred=-2;
                }else{
                    pred=i;
                    k++;
                }
            }
        }
        out.println(k);
    }

    static void problemA(Input in, PrintWriter out) throws IOException {
        int t=in.nextInt();
        for (; t >0 ; t--) {
            long a=in.nextLong(),b=in.nextLong(),k=in.nextLong();
            out.println((a-b)*(k/2)+a*(k%2));
        }
    }

    public class eratosfen {
        boolean[] primes;
        public eratosfen(int n) {
            primes=new boolean[n+1];
        }
        public ArrayList<Integer> fillSieve() {
            ArrayList<Integer> a=new ArrayList<>();
            Arrays.fill(primes, true);
            primes[0] = false;
            primes[1] = false;
            for (int i = 2; i < primes.length; ++i) {
                if (primes[i]) {
                    for (int j = 2; i * j < primes.length; ++j) {
                        primes[i * j] = false;
                    }
                    a.add(i);
                }
            }
            return a;
        }
    }

    static class Input {
        BufferedReader in;
        StringBuilder sb = new StringBuilder();

        public Input(BufferedReader in) {
            this.in = in;
        }

        public Input(String s) {
            this.in = new BufferedReader(new StringReader(s));
        }

        public String next() throws IOException {
            sb.setLength(0);
            while (true) {
                int c = in.read();
                if (c == -1) {
                    return null;
                }
                if (" \n\r\t".indexOf(c) == -1) {
                    sb.append((char) c);
                    break;
                }
            }
            while (true) {
                int c = in.read();
                if (c == -1 || " \n\r\t".indexOf(c) != -1) {
                    break;
                }
                sb.append((char) c);
            }
            return sb.toString();
        }

        public char nextChar() throws IOException {
            while (true) {
                int c = in.read();
                if (c == -1) {
                    return (char)c;
                }
                if (" \n\r\t".indexOf(c) == -1) {
                    return (char)c;
                }
            }
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }
}