Phoenix has a string s consisting of lowercase Latin letters. He wants to distribute all the letters of his string into k non-empty strings a_1, a_2, ..., a_k such that every letter of s goes to exactly one of the strings a_i. The strings a_i do not need to be substrings of s. Phoenix can distribute letters of s and rearrange the letters within each string a_i however he wants.

For example, if s =  baba and k=2, Phoenix may distribute the letters of his string in many ways, such as: 

  * ba and ba
  * a and abb
  * ab and ab
  * aa and bb



But these ways are invalid: 

  * baa and ba
  * b and ba
  * baba and empty string (a_i should be non-empty) 



Phoenix wants to distribute the letters of his string s into k strings a_1, a_2, ..., a_k to minimize the lexicographically maximum string among them, i. e. minimize max(a_1, a_2, ..., a_k). Help him find the optimal distribution and print the minimal possible value of max(a_1, a_2, ..., a_k).

String x is lexicographically less than string y if either x is a prefix of y and x ≠ y, or there exists an index i (1 ≤ i ≤ min(|x|, |y|)) such that x_i < y_i and for every j (1 ≤ j < i) x_j = y_j. Here |x| denotes the length of the string x.

Input

The input consists of multiple test cases. The first line contains an integer t (1 ≤ t ≤ 1000) — the number of test cases. Each test case consists of two lines.

The first line of each test case consists of two integers n and k (1 ≤ k ≤ n ≤ 10^5) — the length of string s and the number of non-empty strings, into which Phoenix wants to distribute letters of s, respectively.

The second line of each test case contains a string s of length n consisting only of lowercase Latin letters.

It is guaranteed that the sum of n over all test cases is ≤ 10^5.

Output

Print t answers — one per test case. The i-th answer should be the minimal possible value of max(a_1, a_2, ..., a_k) in the i-th test case.

Example

Input


6
4 2
baba
5 2
baacb
5 3
baacb
5 3
aaaaa
6 4
aaxxzz
7 1
phoenix


Output


ab
abbc
b
aa
x
ehinopx

Note

In the first test case, one optimal solution is to distribute baba into ab and ab. 

In the second test case, one optimal solution is to distribute baacb into abbc and a.

In the third test case, one optimal solution is to distribute baacb into ac, ab, and b.

In the fourth test case, one optimal solution is to distribute aaaaa into aa, aa, and a.

In the fifth test case, one optimal solution is to distribute aaxxzz into az, az, x, and x.

In the sixth test case, one optimal solution is to distribute phoenix into ehinopx.
/* package codechef; // don't place package name! */

import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.math.*;
import static java.util.stream.Collectors.*;
import static java.util.Map.Entry.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	
	public static void main (String[] args) throws IOException
	{
		final long mod=1000000007;  
//		Reader s=new Reader();
		  PrintWriter pt=new PrintWriter(System.out);
		  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//		  int T=s.nextInt();
		  int T=Integer.parseInt(br.readLine());
//		  int T=1;
		  while(T-->0)
		  {
			  String str=br.readLine();
			  StringTokenizer st=new StringTokenizer(str, " ");
			  int n=Integer.parseInt(st.nextToken());
			  int k=Integer.parseInt(st.nextToken());
			  str= br.readLine();
			  char ch[]=str.toCharArray();
			  int arr[]=new int[ch.length];
			  for(int i=0;i<ch.length;i++)
				  arr[i]=ch[i];
			  sort(arr, 0, n-1);
			  if(arr[k-1]>arr[0]) {
				  pt.println((char)arr[k-1]);
				  continue;
			  }
//			  pt.println(true);
			  boolean same=true;
			  for(int i=k;i<n-1;i++) {
				  if(arr[i]!=arr[i+1])
				  {
					  same=false;
					  break;
				  }
			  }
			  if(!same) {
				  pt.print((char)arr[0]);
				  for(int i=k;i<n;i++)
					  pt.print((char)arr[i]);
				  pt.println();
			  }
			  else
			  {
				  pt.print((char)arr[0]);
				  if(n%k==0) {
					  for(int i=0;i<n/k-1;i++) {
						  pt.print((char)arr[k]);
					  }
				  }
				  else {
					  for(int i=0;i<n/k;i++) {
						  pt.print((char)arr[k]);
					  }
				  }
				  pt.println();
			  }
//			  pt.println();
		  }
		  pt.close();
	}
	static void print(int a[]) {
		int n=a.length;
		for(int i=0;i<n;i++)
		{
//			for(int j=0;j<n;j++)
				System.out.print(a[i]+" ");
//			
		}
		System.out.println();
	}
	static int max (int x, int y) { return (x > y)? x : y; } 
	static int lps(ArrayList<Integer> seq, int i, int j) { 
	    // Base Case 1: If there is only 1 character  
	        if (i == j) { 
	            return 1; 
	        } 
	  
	    // Base Case 2: If there are only 2 characters and both are same  
	        if (seq.get(i) == seq.get(j) && i + 1 == j) { 
	            return 2; 
	        } 
	  
	    // If the first and last characters match  
	        if (seq.get(i) == seq.get(j)) { 
	            return lps(seq, i + 1, j - 1) + 2; 
	        } 
	  
	    // If the first and last characters do not match  
	        return max(lps(seq, i, j - 1), lps(seq, i + 1, j)); 
	    } 
	static boolean check(int x, Vector pos, Vector neg, long k)  
    {  
        int pairs = 0;  
        int p = neg.size() - 1;  
        int nn = neg.size() - 1;  
        int pp = pos.size() - 1;  
        for (int i = 0; i < neg.size(); i++)  
        {  
            while ((p >= 0) && ((long)neg.get(i) *  
                    (long)neg.get(p) <= x))  
                p--;  
            pairs += Math.min(nn - p, nn - i);  
        }  
        p = 0;  
        for (int i = pos.size() - 1; i >= 0; i--) 
        {  
            while ((p < pos.size()) && ((long)pos.get(i) *  
                    (long)pos.get(p) <= x))  
                p++;  
            pairs += Math.min(p, i);  
        }  
        p = pos.size() - 1;  
        for (int i = neg.size() - 1;  
            i >= 0; i--) {  
            while ((p >= 0) && ((long)neg.get(i) *  
                    (long)pos.get(p) <= x))  
                p--;  
            pairs += pp - p;  
        }  
      
        return (pairs >= k);  
    }  
    static int kth_element(long a[], int n, long k)  
    {  
        Vector pos = new Vector(); 
        Vector neg = new Vector(); 
        for (int i = 0; i < n; i++) 
        {  
            if (a[i] >= 0)  
                pos.add(a[i]);  
            else
                neg.add(a[i]);  
        }  
        Collections.sort(pos); 
        Collections.sort(neg); 
      
        int l = (int)-1e8, ans = 0, r = (int)1e8;  
        while (l <= r) 
        {  
            int mid = (l + r) >> 1;  
            if (check(mid, pos, neg, k))  
            {  
                ans = mid;  
                r = mid - 1;  
            }  
            else
                l = mid + 1;  
        }  
        return ans;  
    } 
	static int search(Pair[] p, Pair pair) {
		int l=0, r=p.length;
		while (l <= r) { 
	        int m = l + (r - l) / 2;
	        if (p[m].compareTo(pair)==0) 
	            return m; 
	        if (p[m].compareTo(pair)<0) 
	            l = m + 1; 
	        else
	            r = m - 1;
	    }
	    return -1;
	}
	static int fix(int n)
	{
		for(int i=2;i*i<=n;i++) {
			if(n%i==0)
				return i;
		}
		return 1;
	}
	static int fix(int a,int b)
	{
		if(a<1)
			return 1;
		else if(a>b)
			return b;
		else
			return a;
	}
	static void add(StringBuffer sb, int x, int y)
	{
		if(x>0)
		{
			for(int i=0;i<x;i++)
				sb.append("R");
		}
		else
		{
			for(int i=0;i<-x;i++)
				sb.append("L");
		}
		if(y>0)
		{
			for(int i=0;i<y;i++)
				sb.append("D");
		}
		else
		{
			for(int i=0;i<-y;i++)
				sb.append("U");
		}
	}
	static void pa(int a[])
	{
		for(int i=0;i<a.length;i++)
			System.out.print(a[i]+" ");
		System.out.println();
		
	}
	static void pa(long a[])
	{
		for(int i=0;i<a.length;i++)
			System.out.print(a[i]+" ");
		System.out.println();
		
	}
	static void reverseArray(int arr[], 
            int start, int end) 
	{ 
		int temp; 
		   
		while (start < end) 
		{ 
		    temp = arr[start];  
		    arr[start] = arr[end]; 
		    arr[end] = temp; 
		    start++; 
		    end--; 
		}  
	}     
	static boolean isp(String s) {
		int l=s.length();
		for(int i=0;i<l/2;i++)
		{
			if(s.charAt(i)!=s.charAt(l-i-1))
				return false;
		}
		return true;
	}
	static long nc2(long n, long m) {
		return (n*(n-1)/2)%m;
	}
	static long c(long a) {
		return a*(a+1)/2;
	}
	static int next(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    }  
	static String toString(char [] c)
	{
		StringBuffer b=new StringBuffer("");
		for(int i=0;i<c.length;i++)
			b.append(c[i]);
		return b.toString();
	}
	static long power(long x, long y, long p) 
    { 
        long res = 1; 
        x = x % p; 
                      
        while (y > 0) 
        { 
            if (y % 2 == 1) 
                res = (res * x) % p; 
            y = y >> 1;
            x = (x * x) % p; 
        } 
        return  res; 
    } 
    static long modInverse(long n, long p) 
    { 
        return power(n, p-2, p); 
    } 
    static long nCrModP(long n, long r, 
                                    long p) 
    { 
        if (r == 0) 
            return 1; 
        long[] fac = new long[(int) (n+1)]; 
        fac[0] = 1; 
        for (int i = 1 ;i <= n; i++) 
            fac[i] = fac[i-1] * i % p; 
        return (fac[(int) n]* modInverse(fac[(int) r], p) 
                % p * modInverse(fac[(int) (n-r)], p) 
                                    % p) % p; 
    } 
	static String rev(String str)
	{
		return new StringBuffer(str).reverse().toString();
	}

	static boolean search(int arr[], int n, int x) 
    { 
        for(int i=0;i<n;i++)
        	if(arr[i]==x)
        		return true;
        return false;
    }

	static long fastpow(long x, long y, long m)  
    { 
        if (y == 0) 
            return 1; 
          
        long p = fastpow(x, y / 2, m) % m; 
        p = (p * p) % m; 
      
        if (y % 2 == 0) 
            return p; 
        else
            return (x * p) % m; 
    } 
	
	static boolean isPerfectSquare(long l)
	{
		return Math.pow((long)Math.sqrt(l),2)==l;
	}
	
	
	static void merge(int arr[], int l, int m, int r) 
    { 
        // Find sizes of two subarrays to be merged 
        int n1 = m - l + 1; 
        int n2 = r - m; 
  
        /* Create temp arrays */
        int L[] = new int [n1]; 
        int R[] = new int [n2]; 
  
        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i) 
            L[i] = arr[l + i]; 
        for (int j=0; j<n2; ++j) 
            R[j] = arr[m + 1+ j]; 
  
  
        /* Merge the temp arrays */
  
        // Initial indexes of first and second subarrays 
        int i = 0, j = 0; 
  
        // Initial index of merged subarry array 
        int k = l; 
        while (i < n1 && j < n2) 
        { 
            if (L[i] <= R[j]) 
            { 
                arr[k] = L[i]; 
                i++; 
            } 
            else
            { 
                arr[k] = R[j]; 
                j++; 
            } 
            k++; 
        } 
  
        /* Copy remaining elements of L[] if any */
        while (i < n1) 
        { 
            arr[k] = L[i]; 
            i++; 
            k++; 
        } 
  
        /* Copy remaining elements of R[] if any */
        while (j < n2) 
        { 
            arr[k] = R[j]; 
            j++; 
            k++; 
        } 
    } 
  
    // Main function that sorts arr[l..r] using 
    // merge() 
    static void sort(int arr[], int l, int r) 
    { 
        if (l < r) 
        { 
            // Find the middle point 
            int m = (l+r)/2; 
  
            // Sort first and second halves 
            sort(arr, l, m); 
            sort(arr , m+1, r); 
  
            // Merge the sorted halves 
            merge(arr, l, m, r); 
        } 
    } 
    static class Pair implements Comparable<Pair>{
        int a;
        int b;
        Pair(int a,int b){
            this.a=a;
 
            this.b=b;
        }   
        public int compareTo(Pair p){
            if(a>p.a)
                return 1;
            if(a==p.a)
                return (b-p.b);
            return -1;
        }
    }
	static class Reader 
    { 
        final private int BUFFER_SIZE = 1 << 16; 
        private DataInputStream din; 
        private byte[] buffer; 
        private int bufferPointer, bytesRead; 
  
        public Reader() 
        { 
            din = new DataInputStream(System.in); 
            buffer = new byte[BUFFER_SIZE]; 
            bufferPointer = bytesRead = 0; 
        } 
  
        public Reader(String file_name) throws IOException 
        { 
            din = new DataInputStream(new FileInputStream(file_name)); 
            buffer = new byte[BUFFER_SIZE]; 
            bufferPointer = bytesRead = 0; 
        } 
  
        public String readLine() throws IOException 
        { 
            byte[] buf = new byte[64]; // line length 
            int cnt = 0, c; 
            while ((c = read()) != -1) 
            { 
                if (c == '\n') 
                    break; 
                buf[cnt++] = (byte) c; 
            } 
            return new String(buf, 0, cnt); 
        } 
  
        public int nextInt() throws IOException 
        { 
            int ret = 0; 
            byte c = read(); 
            while (c <= ' ') 
                c = read(); 
            boolean neg = (c == '-'); 
            if (neg) 
                c = read(); 
            do
            { 
                ret = ret * 10 + c - '0'; 
            }  while ((c = read()) >= '0' && c <= '9'); 
  
            if (neg) 
                return -ret; 
            return ret; 
        } 
  
        public long nextLong() throws IOException 
        { 
            long ret = 0; 
            byte c = read(); 
            while (c <= ' ') 
                c = read(); 
            boolean neg = (c == '-'); 
            if (neg) 
                c = read(); 
            do { 
                ret = ret * 10 + c - '0'; 
            } 
            while ((c = read()) >= '0' && c <= '9'); 
            if (neg) 
                return -ret; 
            return ret; 
        } 
  
        public double nextDouble() throws IOException 
        { 
            double ret = 0, div = 1; 
            byte c = read(); 
            while (c <= ' ') 
                c = read(); 
            boolean neg = (c == '-'); 
            if (neg) 
                c = read(); 
  
            do { 
                ret = ret * 10 + c - '0'; 
            } 
            while ((c = read()) >= '0' && c <= '9'); 
  
            if (c == '.') 
            { 
                while ((c = read()) >= '0' && c <= '9') 
                { 
                    ret += (c - '0') / (div *= 10); 
                } 
            } 
  
            if (neg) 
                return -ret; 
            return ret; 
        } 
  
        private void fillBuffer() throws IOException 
        { 
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
            if (bytesRead == -1) 
                buffer[0] = -1; 
        } 
  
        private byte read() throws IOException 
        { 
            if (bufferPointer == bytesRead) 
                fillBuffer(); 
            return buffer[bufferPointer++]; 
        } 
  
        public void close() throws IOException 
        { 
            if (din == null) 
                return; 
            din.close(); 
        } 
    } 
}