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.

import java.util.*;
import java.io.*;
public class Main {
    static FastReader in=new FastReader();
    static StringBuilder Sd=new StringBuilder();
    static List<Integer>Gr[]; 
    static int a[],b[];
    static boolean visit[];
    public static void main(String [] args) {
    	//Dir by MohammedElkady
    	int t=in.nextInt();
    	while(t-->0) {
    	int n=in.nextInt(),k=in.nextInt();
    	int a[]=new int[26],min=27,number=0,kk=0;
    	String S=in.next();
    	for(int i=0;i<n;i++) {
    		a[S.charAt(i)-'a']++;
    	min=Math.min(min, S.charAt(i)-'a');
    	if(a[S.charAt(i)-'a']<=1)number++;
    	}
    	
      for(int i=0;i<26;i++) {
    	  if(i==min&&a[i]==k) {kk++;}
      }
        if(k==1) {
        	for(int i=0;i<26;i++) {
        		char c=(char)('a'+i);
        		while(a[i]>0) {a[i]--;Sout(c+"");}
        	}
        	Soutln("");
        }
        else if (kk==1&&number==2) {
        	for(int i=0;i<26;i++) {
        		if(a[i]>0) {
        			int lol=a[i]+k-1;
        			lol/=k;
        			while(lol-->0) {Sout((char)(i+'a')+"");}
        		
        		}
        	}
        	Soutln("");
        }
        else if(number==1) {
        	for(int i=0;i<26;i++) {
        		if(a[i]>0) {
        			int lol=a[i]+k-1;
        			lol/=k;
        			while(lol-->0) {Sout((char)(i+'a')+"");}
        		Soutln("");
        		}
        	}
        }
        else {
        	  for(int i=0,u=0;i<k-1;i++) {
              	if(a[u]>0)a[u]--;
              	else {while(a[u]==0)u++;a[u]--;}
              }
              
        	int x=0;
            while(a[x]==0) {x++;
            }
            a[x]--;
            if(min!=x)
            Soutln((char)(x+'a')+" ");
            else {
            	StringBuilder make=new StringBuilder();
            	make.append((char)(x+'a'));
            	for(int i=0;i<26;i++) {
            		while(a[i]>0) {a[i]--;make.append((char)(i+'a'));}
            	}
            Soutln(make.toString());
            }
            
        }
    	}
    	
    Sclose();
    
    }
    static long gcd(long g,long x){
        if(x<1)return g;
        else return gcd(x,g%x);
    }
    //array fill
    static long[]filllong(int n){long a[]=new long[n];for(int i=0;i<n;i++)a[i]=in.nextLong();return a;}
    static int[]fillint(int n){int a[]=new int[n];for(int i=0;i<n;i++)a[i]=in.nextInt();return a;}
    //OutPut Line
    static void Sout(String S) {Sd.append(S);}
    static void Soutln(String S) {Sd.append(S+"\n");}
    static void Soutf(String S) {Sd.insert(0, S);}
    static void Sclose() {System.out.println(Sd);}
    static void Sclean() {Sd=new StringBuilder();}
}
 
class node implements Comparable<node>{
int x,p;
	node(int x,int p){
		this.x=x;
		this.p=p;
	}
	@Override
	public int compareTo(node o) {
       return (x-p)-(o.x-o.p);
	}
}
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 nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
}
 
class Sorting{
 
 public static int[] bucketSort(int[] array, int bucketCount) {
 
 if (bucketCount <= 0) throw new IllegalArgumentException("Invalid bucket count");
 
 if (array.length <= 1) return array; //trivially sorted
 
 
 
 int high = array[0];
 
 int low = array[0];
 
 for (int i = 1; i < array.length; i++) { //find the range of input elements
 
 if (array[i] > high) high = array[i];
 
 if (array[i] < low) low = array[i];
 
 }
 
 double interval = ((double)(high - low + 1))/bucketCount; //range of one bucket
 
 
 ArrayList<Integer> buckets[] = new ArrayList[bucketCount];
 
 for (int i = 0; i < bucketCount; i++) { //initialize buckets
 
 buckets[i] = new ArrayList();
 
 }
 
 
 
 for (int i = 0; i < array.length; i++) { //partition the input array
 
 buckets[(int)((array[i] - low)/interval)].add(array[i]);
 
 }
 
 
 int pointer = 0;
 
 for (int i = 0; i < buckets.length; i++) {
 
 Collections.sort(buckets[i]); //mergeSort
 
 for (int j = 0; j < buckets[i].size(); j++) { //merge the buckets
 
 array[pointer] = buckets[i].get(j);
 
 pointer++;
 
 }
 
}
 
return array;
 
}
}