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, \dots, 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, \dots, a_k$ to minimize the lexicographically maximum string among them, i. e. minimize $max(a_1, a_2, \dots, a_k)$. Help him find the optimal distribution and print the minimal possible value of $max(a_1, a_2, \dots, a_k)$.

String $x$ is lexicographically less than string $y$ if either $x$ is a prefix of $y$ and $x \ne y$, or there exists an index $i$ ($1 \le i \le min(|x|, |y|))$ such that $x_i$ < $y_i$ and for every $j$ $(1 \le 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 \le t \le 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 \le k \le n \le 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 $\le 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, \dots, 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.

Difficulty: interview

Starter code:

Solutions:
import sys
readline = sys.stdin.readline

T = int(readline())
Ans = [None]*T
for qu in range(T):
    N, K = map(int, readline().split())
    S = list(map(lambda x: ord(x)-97, readline().strip()))
    S.sort()
    if len(set(S[:K])) != 1:
        Ans[qu] = chr(97+S[K-1])
        continue
    L = len(set(S[K:]))
    if L == 1:
        res = [S[0]] + [S[K]]*(-((K-N)//K))
    else:
        res = [S[0]] + S[K:]
    Ans[qu] = ''.join(map(lambda x: chr(x+97), res))
            
print('\n'.join(map(str, Ans)))

import sys
from collections import defaultdict
from copy import copy

R = lambda t = int: t(input())
RL = lambda t = int: [t(x) for x in input().split()]
RLL = lambda n, t = int: [RL(t) for _ in range(n)]


def solve():
  n, k = RL()
  s = sorted(R(str))
  if n == k:
    print(s[-1])
    return
  if s[0] < s[k-1]:
    print(s[k-1])
    return
  if s[-1] == s[k]:
    print(s[0] + "".join(s[k:][:(n-1)//k]))
    return
  print(s[0] + "".join(s[k:]))
  
T = R()
for _ in range(T):
  solve()


from collections import Counter

def read_int():
    return int(input())


def read_ints():
    return map(int, input().split(' '))


t = read_int()
for case_num in range(t):
    n, k = read_ints()
    s = input()
    s = [c for c in s]
    s.sort()
    cnt = Counter(s)
    l = list(cnt)
    l.sort()
    if cnt[l[0]] < k:
        print(s[k - 1])
    else:
        if len(l) == 1:
            add = 0 if cnt[l[0]] % k == 0 else 1
            ans = l[0] * (n // k + add)
            print(ans)
        elif cnt[l[0]] == k and len(l) == 2:
            add = 0 if cnt[l[1]] % k == 0 else 1
            ans = l[0] + (l[1] * (n // k + add - 1))
            print(ans)
        else:
            print(l[0] + ''.join(s[k:]))

t=int(input())
for _ in range(t):
    n,k=map(int,input().split())
    s=list(input())
    s=sorted(s)
    if k==1:
        print(''.join(map(str,s)))
    elif len(set(s))==1:
        print(s[0]*((n+k-1)//k))
    else:
        if len(set(s[:k]))!=1:
            print(s[k-1])
        else:
            tmp=s[0]
            s=s[k:]
            if len(set(s))!=1:
                print(tmp+''.join(map(str,s)))
            else:
                print(tmp+s[0]*((n-k+k-1)//k))

t = int(input())
for _ in range(t):
    n, k = list(map(int, input().split()))
    s = input()
    chars = sorted([c for c in s])
    if chars[k-1] > chars[0]:
        print(chars[k-1])
    elif chars[0] == chars[n-1]:
        print(''.join([chars[0]] * ((n + k - 1) // k)))
    elif chars[k] != chars[0] and chars[k] == chars[n-1]:
        print(''.join([chars[0]] + [chars[k]] * ((n - 1) // k)))
    else:
        print(''.join(chars[k-1:]))


q = int(input())
for _ in range(q):
	n,k = list(map(int,input().split()))
	s = list(input())
	s.sort()
	slowo = [[] for i in range(k)]
	if s[0] != s[k-1]:
		print(s[k-1])
	else:
		if k == n:
			print(s[n-1])
		else:
			dl = (n-1)//k
			if s[k] == s[-1]:
				odp = [s[0]] + [s[k]]*dl
			else:
				odp = [s[0]] + s[k:]
			print("".join(odp))


import sys

input = sys.stdin.readline

for _ in range(int(input())):
    n, k = map(int, input().split())
    s = list(input().rstrip())
    s.sort()
    if len(set(s[:k])) > 1:
        print(max(s[:k]))
        continue
    ss = s[k:]
    if len(set(ss)) == 1:
        print(s[0], *([ss[0]] * ((len(ss) - 1) // k + 1)), sep = "")
    else:
        print(s[0], *s[k:], sep = "")


from collections import Counter,defaultdict,deque
import heapq as hq
#from itertools import count, islice
#from functools import reduce
#alph = 'abcdefghijklmnopqrstuvwxyz'
#from math import factorial as fact
#a,b = [int(x) for x in input().split()]
import math
import sys
input=sys.stdin.readline
def solve():
    n,k = [int(x) for x in input().split()]
    arr = [x for x in input().strip()]
    arr.sort()
    first = arr[:k]
    if first[0] == first[-1]:
        rest = arr[k:]
        if len(Counter(rest))==1:
            print(first[0]+rest[0]*math.ceil(len(rest)/k))
        else:
            print(first[0]+''.join(rest))
    else:
        print(first[-1])

tt = int(input())
for test in range(tt):
    solve()















#


t = int(input())
for i in range(t):
    n, k = list(map(int, input().split()))
    s = list(input())
    s.sort()
    ans = []
    if k == n:
        print(s[k - 1])
    elif s[0] == s[k - 1] and s[k] == s[n - 1]:
        ans_s = s[0] + s[k] * ((n - k) // k)
        if n % k == 0:
            print(ans_s)
        else:
            print(ans_s + s[k])
    else:
        if s[0] == s[k - 1]:
            print(s[0] + "".join(list(map(str, s[k:]))))
        else:
            print(s[k - 1])


T = int(input())
for case in range(T):
	n,k = [int(x) for x in input().split()]
	s = input()
	ls = sorted(list(s))
	#print(ls)
	ret = ""
	#while len(ls) != 0:
	alset = set(ls[:k])
	#for i in range(k):
		#alset.add(ls[i])
		#ret[i] += ls[i]
	if len(alset) == 1:
		ret += ls[0]
		if len(set(ls[k:])) == 1:
			ret += str(ls[k]) * ((len(ls[k:]) - 1) // k + 1)
		else:
			ret += "".join(ls[k:])
	else:
		ret += ls[k-1]
		#break
	
	print(ret)


		



import sys
#from math import *
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('output2.txt','w')
t=int(input())
while t>0:
	t-=1	
	n,k=map(int,input().split())
	s=list(input().rstrip())
	s.sort()
	d={}
	a=["" for i in range(k)]
	for i in range(k):
		a[i%k]+=s[i]
	

	j=0	
	i=k

	if len(set(s[k:]))==1:
		for i in range(k,len(s)):
			a[j%k]+=s[i]
			j+=1
			if j==k or a[j][0]>a[0][0]:
				j=0
	else:
		for i in range(k,len(s)):
			a[j%k]+=s[i]		
	#print(a)
	print(max(a))