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.

from math import factorial as fac
from collections import defaultdict
from copy import deepcopy
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange
# print(f.readline())
# sys.setrecursionlimit(10**6)


def print_case_iterable(case_num, iterable):
	print("Case #{}: {}".format(case_num," ".join(map(str,iterable))))

def print_case_number(case_num, iterable):
	print("Case #{}: {}".format(case_num,iterable))

def print_iterable(A):
	print (' '.join(A))

def read_int():
	return int(f.readline().strip())
def read_int_array():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def read_string():
	return list(f.readline().strip())

NUMBER = 10**9 + 7
# NUMBER = 998244353
def factorial(n) : 
	M = NUMBER
	f = 1
  
	for i in range(1, n + 1):  
		f = (f * i) % M # Now f never can  
						# exceed 10^9+7  
	return f
def mult(a,b):
	return (a * b) % NUMBER

def minus(a , b):
	return (a - b) % NUMBER

def plus(a , b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		g, y, x = egcd(b % a, a)
		return (g, x - (b // a) * y, y)

def modinv(a):
	m = NUMBER
	g, x, y = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m
from collections import deque, defaultdict 
import heapq

def bfs(V, E):
	s = set()
	print('\n'.join(map(str,E.items())))
	cnt = 0 
	for v in V:
		if v in s:
			continue
		q = deque([])
		s.add(v)
		q.append(v)
		while len(q) > 0:
			x = q.popleft()
			for e in E[x]:
				if e not in s:
					s.add(e)
					q.append(e)
			print(q)
		cnt += 1
	return cnt
		
# from typing import List, Tuple

def binary_count_smaller(L, x):
	l = 0
	if x < L[0]:
		return 0
	r = len(L)
	while r - l > 1:
		mid = (l+r)//2
		if L[mid] < x:
			l = mid
		else:
			r = mid
	return l + 1
def binary_count_larger(L, x):
	l = 0
	if x > L[-1]:
		return 0
	r = len(L)
	while r - l > 1:
		mid = (l+r)//2
		if L[mid] <= x:
			l = mid
		else:
			r = mid
	return len(L) - (r-1)

def regular_bs(L,x,l=None,r=None):
	l = 0 if l == None else l
	r = len(L) if r == None else r
	while (r-l) > 1:
		m = (r+l)//2
		l = m if L[m] <= x else l
		r = m if L[m] > x else r
	cnt = 0
	return l

from itertools import product

def preprocess():
	nums = dict(zip(sequences,range(10)))
	changes = defaultdict(dict)
	for comb in map(lambda x: ''.join(x), product(*([['0','1']]*7))):
		for seq in sequences:
			a = int(comb,2)
			b = int(seq,2)
			num_changes = bin(a^b).count('1')
			if num_changes == seq.count('1') - comb.count('1'):
				changes[comb][num_changes] = nums[seq]
	return changes


# import StringIO use for PYPY when lots of prints
#example usage:
#	 for l in res:
#	 	print >>output, str(len(l)) + ' ' +  ' '.join(l)
from collections import deque

# def solution1(x,y,l,r):
# 	pass
# 	if x*y*r == 0:
# 		return 0
# 	x = x % 2**r.bit_length()
# 	y = y % 2**r.bit_length()
# 	if l <= (x | y) <=r:
# 		return x | y
# 	binr = bi(r)
# 	binl = bi(l) #remeber l might be 0
# 	first_diff = r.bit_length() - (r^l).bit_length()
# 	res = binr[:first_diff]
# 	two_first = 2**(r^l).bit_length()
# 	use_zero = (x|y) & (two_first-1)
# 	if x&two_first and y&two_first:
# 		return res + solution(x,y,int(binr[first_diff+1:],2))
# 	if x&two_first:
# 		return max(use_zero, short(y,))
# 	# use_one = 
# 	# max((x|y)&(2**(r^l).bit_length()-1))


	# return x | y
def short(x,r):
	x = x % (2**(r.bit_length()))
	return x

def max_short(x,r):
	x = short(x,r)
	if x <= r:
		return x
	le = r.bit_length()-1
	return 2**le + max_short(x ,r%(2**le))

def bi(x):
	return bin(x)[2:]




def operation(x,y,z):
	return (x&z) * (y&z)

def get_min_z(x,y,z):
	return (x|y) & z

def solution(A,n,k):
	A.sort()
	S = sorted(set(A))
	if len(S) == 1:
		return A[0] * (n//k + (1 if n%k else 0))
	# print(S)
	d = defaultdict(int)
	for x in A:
		d[x]+=1
	if len(S) == 2 and d[S[0]] == k:
		return S[0] + S[1] * (d[S[1]]//k + (1 if d[S[1]]%k else 0))
	res = ''
	x = A[0]
	if d[x] >= k:
		return ''.join(A[k-1:])
	return A[k-1]
	# for x in S:
	# 	res+=x
	# 	if d[x] % k:
	# 		return res
	# return res
	# list_a = sorted(list(s))
	# if len(s) > k:
	# 	print(-1)
	# 	return 
	# to_repeat = []
	# for i in range(k):
	# 	to_repeat.append(list_a[i%len(list_a)])
	# s_to_repeat = ' '.join(map(str,to_repeat))
	# m = n * k
	# final_list = [s_to_repeat for i in range(n)]
	# final_s = ' '.join(final_list)
	# print(m)
	# print(final_s)

	


def main():
	T = read_int()
	for i in range(T):
		n,k = read_int_array()
		A = read_string()
		print(solution(A,n,k))


if __name__ == '__main__':
	main()
