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:
//    A Computer is Like a mischievous genie.
//    It will give you exactly what you ask for,
//    but not always what you want
//    A code by Rahul Verma


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import sun.reflect.generics.tree.Tree;


public class Main {


    static class Clock {

        protected long start, stop;

        public void start() {

            start = System.currentTimeMillis();
        }

        public void stop() {
            stop = System.currentTimeMillis();
        }

        public String getTime() {

            return ((stop - start) + " ms");
        }
    }


    public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String[] nextSArray() {
            String sr[] = null;
            try {
                sr = br.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return sr;
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }

            return str;
        }
    }


    static long powmodulo(long a, long p) {
        if (p == 0) {
            return 1 % mod;
        }
        if (p == 1) {
            return a % mod;
        }
        long ans = 1;
        while (p > 0) {
            if ((p & 1) > 0) {
                ans = (ans * a) % mod;
            }
            a = (a * a) % mod;
            p = p >> 1;
        }
        return ans % mod;
    }


    static long mod = (long) 1e9+7;

    static long gcd(long a, long b) {
        if (a == 0) {
            return b;
        }
        return gcd(b % a, a);
    }



    static long fast_powerNumbers(long a, long n) {
        if (n == 1) {
            return a;
        }
        long ans = fast_powerNumbers(a, n / 2);
        if (n % 2 == 0) {
            return (ans * ans);
        } else {
            return ((ans * ans) * (a));
        }
    }


    static ArrayList<Integer> prime = new ArrayList<>();

    public static void seive(int n) {
        int arr[] = new int[n + 1];
        arr[2] = 0;
        prime.add(2);
        arr[0] = 1;
        arr[1] = 1;
        int x = 0;
        for (int i = 2; i * i <= n; ++i) {
            if (arr[i] == 0) {
                for (int j = i * i; j <= n; j += i) {
                    arr[j] = 1;

                }
            }
            x = i;
        }

        for (int i = 1; i <= n; i++) {
            if (arr[i] == 0)
                prime.add(i);
        }
    }
    static ArrayList<Integer>ans=new ArrayList<>();
    public static boolean fun(ArrayList<Pair>al,int x, int t) {
        ArrayList<Integer> temp = new ArrayList<>();
        for (Pair p : al)
        {
            int row = p.b/x;
           // System.out.println(row+" "+p.b+" "+x);
            int nn=Math.min(t,row);
            if(nn==0)
                break;
            for (int i = 0; i <nn ; i++) {
                temp.add(p.a);
                --t;
            }
            if(t==0)
            {
               // System.out.println(temp);
                ans= (ArrayList<Integer>) temp.clone();
                return true;

            }

        }
        if(t==0)
        {
            ans= (ArrayList<Integer>) temp.clone();
            return true;

        }
        else return false;


    }

    public static void main(String[] args) {
        FastReader sc=new FastReader();
        int n =sc.nextInt();
        int t =sc.nextInt();
        HashMap<Integer,Integer>hm=new HashMap<>();
        PriorityQueue<Pair>pq=new PriorityQueue<>(new Comparator<Pair>() {
            @Override
            public int compare(Pair o1, Pair o2) {
                if(o1.b==o2.b)
                    return Integer.compare(o1.a,o2.a);
                return Integer.compare(o1.b,o2.b);
            }
        });
        for (int i = 0; i < n; i++) {
            int ele=sc.nextInt();
            hm.put(ele, hm.getOrDefault(ele,0)+1);



        }
        for(Integer ele: hm.keySet())
        {
            pq.add(new Pair(ele, hm.get(ele)));
            if(pq.size()>t)
                pq.poll();
        }
        ArrayList<Pair>al=new ArrayList<>(pq);
        Collections.sort(al, new Comparator<Pair>() {
            @Override
            public int compare(Pair o1, Pair o2) {
                return Integer.compare(o2.b,o1.b);
            }
        });
        int s=1;
        int l = n/t;
        while(s<=l)
        {
            int mid = s + (l-s)/2;
            boolean can = fun(al,mid, t);
            if(can)
            {
                s=mid+1;
            }
            else
            {
                l=mid-1;
            }
        }
        for(Integer ele: ans)
            out.print(ele+" ");
        out.close();
       // System.out.println(al);





    }




}


class Pair {

    int a;
    int b;

    Pair(int a, int b) {
        this.a = a;
        this.b = b;
    }
}

class DSU {

    int parent[];
    int rank[];

    DSU(int n) {
        parent = new int[n];
        rank = new int[n];
        for (int i = 0; i < n; i++) {
            parent[i] = -1;
            rank[i] = 1;
        }
    }

    int find(int s1) {
        if (parent[s1] == -1) {
            return s1;
        }
        return parent[s1] = find(parent[s1]);
    }

    void unite(int s1, int s2) {
        int p1 = find(s1);
        int p2 = find(s2);
        if (p1 != p2) {
            if (rank[p1] > rank[p2]) {
                parent[p2] = p1;
                rank[p1] += rank[p2];
            } else {
                parent[p1] = p2;
                rank[p2] += rank[p1];
            }
        }
    }
}

class Gaph {

    HashMap<Integer, ArrayList<Integer>> hm;

    Gaph() {
        hm = new HashMap<>();
    }

    Gaph(int n) {

        hm = new HashMap<>();
        for (int i = 0; i < n; i++) {
            hm.put(i, new ArrayList<Integer>());
        }
    }

    // function for adding an edge.................................................
    public void addEdge(int a, int b, boolean isDir) {
        if (isDir) {
            if (hm.containsKey(a)) {
                hm.get(a).add(b);
            } else {
                hm.put(a, new ArrayList<>(Arrays.asList(b)));
            }
        } else {
            if (hm.containsKey(a)) {
                hm.get(a).add(b);
            } else if (!hm.containsKey(a)) {
                hm.put(a, new ArrayList<>(Arrays.asList(b)));
            }

            if (hm.containsKey(b)) {
                hm.get(b).add(a);
            } else if (!hm.containsKey(b)) {
                hm.put(b, new ArrayList<>(Arrays.asList(a)));
            }
        }
    }


}

// out.println(al.toString().replaceAll("[\\[|\\]|,]",""));