You are given a string s consisting of lowercase English letters and a number k. Let's call a string consisting of lowercase English letters beautiful if the number of occurrences of each letter in that string is divisible by k. You are asked to find the lexicographically smallest beautiful string of length n, which is lexicographically greater or equal to string s. If such a string does not exist, output -1.

A string a is lexicographically smaller than a string b if and only if one of the following holds: 

  * a is a prefix of b, but a ≠ b; 
  * in the first position where a and b differ, the string a has a letter that appears earlier in the alphabet than the corresponding letter in b. 

Input

The first line contains a single integer T (1 ≤ T ≤ 10 000) — the number of test cases.

The next 2 ⋅ T lines contain the description of test cases. The description of each test case consists of two lines.

The first line of the description contains two integers n and k (1 ≤ k ≤ n ≤ 10^5) — the length of string s and number k respectively.

The second line contains string s consisting of lowercase English letters.

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

Output

For each test case output in a separate line lexicographically smallest beautiful string of length n, which is greater or equal to string s, or -1 if such a string does not exist.

Example

Input


4
4 2
abcd
3 1
abc
4 3
aaaa
9 3
abaabaaaa


Output


acac
abc
-1
abaabaaab

Note

In the first test case "acac" is greater than or equal to s, and each letter appears 2 or 0 times in it, so it is beautiful.

In the second test case each letter appears 0 or 1 times in s, so s itself is the answer.

We can show that there is no suitable string in the third test case.

In the fourth test case each letter appears 0, 3, or 6 times in "abaabaaab". All these integers are divisible by 3.
def toNum(letter):
    return ord(letter) - ord('a')

def toChr(num):
    return chr(num + ord('a'))

def getRemaining(num, k):
    return (k - num % k) % k

def getRemainingSum(k, cnt):
    sm = 0
    for num in cnt:
        sm += getRemaining(num, k)
    return sm
    
for cases in range(int(input())):
    n, k = map(int, input().split())
    s = input()
    cnt = [0 for x in range(26)]
    if n % k != 0:
        print(-1)
        continue

    for letter in s:
        cnt[toNum(letter)] += 1
    
    sm = getRemainingSum(k, cnt)
    #print(f"cnt = {cnt}")
    #print(f"sm = {sm}")

    if sm == 0:
        # the string itself is the solution
        print(s)
        continue

    i = n - 1
    flag = True
    while i >= 0 and flag:
        # remove the needs of the current element from total
        sm -= getRemaining(cnt[toNum(s[i])], k)

        # recount current element needs without itself
        cnt[toNum(s[i])] -= 1

        # update the total sum accordingly
        sm += getRemaining(cnt[toNum(s[i])], k)

        # itereate through possible replacements starting with the next alphabet letter
        j = toNum(s[i]) + 1
        while j < 26:
            # save current sum
            lastsum = sm

            # remove the needs of the current candidate letter 
            sm -= getRemaining(cnt[j], k)

            # increment current candidate letter cnt
            cnt[j] += 1

            # update the sum with up to date current candidate needs
            sm += getRemaining(cnt[j], k)

            if i + sm + 1 <= n:
                # seems like a suitable candidate as the sum fits 

                # print out the parts we are sure about
                for pos in range(i):
                    print(s[pos], end="")
                
                # print good candidate
                print(toChr(j), end="")

                # need to resolve the remaining part
                add = []
                
                # iterate alphabet starting from the beginning
                for w in range(26):
                    # if letter w is needed n times, print it out
                    f = getRemaining(cnt[w], k)
                    while f:
                        f -= 1
                        add.append(toChr(w))
                # now even if is sm is 0 (no letters needed) there might still be letters missing
                # e.g. n = 6, k = 2 current str = aabb
                # so we fill the remaining places with 'a'

                while len(add) + i + 1 < n:
                    add.append(toChr(0))

                # sort the remaining to get the minimal string
                # we are sure not getting anything less than the initial string
                # as the candidate is already larger than whomever it replaced
                add.sort()

                print("".join(add))
                flag = False
                break

            # bad candidate, decrement its count to get rdy for the next one
            cnt[j] -= 1

            # restore current sum
            sm = lastsum

            j += 1
        i -= 1

