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.
"""
#If FastIO not needed, use this and don't forget to strip
#import sys, math
#input = sys.stdin.readline
"""

import os, sys, heapq as h, time
from io import BytesIO, IOBase
from types import GeneratorType
from bisect import bisect_left, bisect_right
from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string
BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

#start_time = time.time()

def getInt(): return int(input())
def getStrs(): return input().split()
def getInts(): return list(map(int,input().split()))
def getStr(): return input()
def listStr(): return list(input())
def getMat(n): return [getInts() for _ in range(n)]
def isInt(s): return '0' <= s[0] <= '9'

MOD = 10**9 + 7 

"""
Note that 'zzzzzzz' satisfies any requirements where N % K = 0
In fact, repeating the first letter after our first letter that many times will suffice
What is the latest place we can allow the string to differ?
Possible up to the point we're at if sum((-count[letter])%K) for all letters is <= remaining letters, and there exists a letter in the set that is
>= the next letter
"""


def solve():
    N, K = getInts()
    S = listStr()
    if N % K != 0: return -1
    counts = [0]*26
    ord_a = ord('a')
    for a in S:
        counts[ord(a) - ord_a] += 1
        counts[ord(a) - ord_a] %= K
    t = S[:]
    curr = 0
    for j in range(26):
        curr += (-counts[j])%K
    rem = 0
    #print(curr,counts)
    flag = False
    if curr == 0: return ''.join(S)
    while curr > rem or not flag:
        x = t.pop()
        ord_x = ord(x)-ord_a
        curr -= (-counts[ord_x])%K
        counts[ord_x] -= 1
        counts[ord_x] %= K
        curr += (-counts[ord_x])%K
        flag = False
        for j in range(ord_x+1,26):
            tmp_curr = curr
            tmp_curr -= (-counts[j])%K
            tmp_curr += ((-counts[j]-1)%K)
            if tmp_curr <= rem:
                flag = True
                break
        if flag:
            t.append(chr(ord_a+j))
            counts[j] += 1
            counts[j] %= K
            break
        rem += 1
    tmp_ans = []
    #print(t)
    for j in range(25,-1,-1):
        tmp_ans += [chr(j+ord_a)]*(-counts[j]%K)
    tmp_ans.reverse()
    t += (N-len(tmp_ans)-len(t))*['a']
    return ''.join(t+tmp_ans)
    
for _ in range(getInt()):
    print(solve())
#solve()

#print(time.time()-start_time)