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.
"""
Given a string s and an integer k,
you have to assign each character c of s to exactly one of k buckets
such that no bucket is empty.
Call the strings formed by these buckets a1,a2,...,ak.
You want to find and print:
min(max(a1,a2,...,ak)), where the strings are compared lexicographically.

Observations:
- Once you pick the buckets, you would choose the best version within that bucket to be ai.
So ai = sorted(''.join(c for c in bucket))
- Let result be the answer. For i < len(result), result[i] <= max(a1[i],a2[i],...,ak[i])
- We want to minimize result[0] first
- Then, we want to minimize result[1] given result[0]
- Then, we want to minimize result[2] given result[1]
- This leads me down the path of thinking just to pick the lowest character for the k buckets, 
and then yolo the rest down on one bucket. I don't have a clear understanding of how length factors in 
with lexicographic sorts though.
- a < ab
- ab < abc
- abc < abcd
- a < b
- ab < b
- a < aa
- It looks like for any character c, the minimal string starting at that character is just c itself.
    - Therefore, if the lowest character < kth lowest character, then the answer = kth lowest character.
- What if they are equal?
    - then the answer should just be the first character + sorted( (k+1)th character onwards )
    - Proof:
        - Suppose another string result' is the minimal maximum. Then, len(result') < len(result)
        At some point, a char in sorted order will not appear in result'. Call that index i. 
        From the observations above, we can see that clearly result < result', because result'[i] > result[i].
        This is a contradiction.
    - Not quite correct because I didn't take into account that given equivalent characters, shorter
    lengths are lexicographically smaller.
    - Just put equivalent characters in other strings. So instead of list, it can be set?
        - No. The equivalent characters need to be split equivalently throughout the buckets.
        - Example: aaaaaaaaaaaaaaaaaaaaaaaaaaaa (just a huge strings of a's will break for any given k)
    - Only do this if len(set(sorted[k:])) == 1
        - If two chars are equal, increment a counter mod k
        - Only add the char to the result if the counter == 0 mod k
            - Shit, this breaks the cases where there are other characters besides that


Solution ideas:
- Brute force: Go through all possible mappings, and then pick the minimum there.
- Greedy:
    - Sort the string, put the first k characters each in their own buckets. 
    - If sorted[0] != sorted[k-1]:
        - ans = sorted[k-1]
    - else if there all the characters are the same in sorted[k:]:
        - Do the counter stuff described above
    - else:
        - ans = sorted[0] + sorted[k:] 
    - I'm not too certain my proof of this is rock solid, so I'll just implement a brute force and check
        - Brute force is too hard :( maybe at this point its better to just yolo it and see if it works
        for the maybe 50% chance I don't have to implement the brute force solution (which would probably take 15 minutes at least)

"""

import itertools 
def brute(s,k):
    n = len(s)
    result = 'z'*len(s)
    for assignments in itertools.product(list(range(k)), repeat=n):
        buckets = [ [] for _ in range(k) ]
        for c, assign in zip(s, assignments):
            buckets[assign].append(c)
        # print(buckets)
        if any(len(bucket) == 0 for bucket in buckets):
            continue
        currStr = max(''.join(c for c in sorted(bucket)) for bucket in buckets)
        # print(currStr)
        result = min(result, currStr)
    # print(result)
    # return ''.join(c for c in result)
    return result

def fast(s,k):
    sSorted = sorted(s)
    if k == 1:
        return ''.join(sSorted)
    if sSorted[0] != sSorted[k-1]:
        return sSorted[k-1]
    elif len(set(sSorted[k:])) == 1:
        resultArr = [sSorted[0]]
        ctr = 0
        for c in sSorted[k:]:
            if c != resultArr[-1]:
                resultArr.append(c)
                ctr = 1
            else:
                if ctr == 0:
                    resultArr.append(c)
                ctr = (ctr+1)%k
        return ''.join(resultArr)
    return ''.join( [sSorted[0]] + sSorted[k:] )

import random
import string
def randomTest():
    t = 10000
    for i in range(1,t+1):
        n = random.randint(1,6)
        s = ''.join([random.choice(string.ascii_lowercase) for _ in range(n)])
        k = random.randint(1,n)
        print(i,s,k)
        b = brute(s,k)
        f = fast(s,k)
        if b != f:
            print('Broken!')
            print(b,f)
            return

def main():
    t = int(input())
    for _ in range(t):
        n, k = [int(x) for x in input().split()]
        s = input()

        #CHANGE
        result = fast(s,k)
        # result = brute(s,k)

        print(result)

def test():
    s = 'lww'
    k=1
    b = brute(s,1)
    f = fast(s,1)
    print(b,f)

# randomTest()
main()
# test()