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.
import sys

input = sys.stdin.readline

def solve():
	for i in range(int(input())):
		n, k = map(int, input().split())
		s = input().strip()
		if k == 1:
			print(s)
			continue
		if n % k != 0:
			print(-1)
			continue
		#print('now',s)
		want = [0]*26
		need = 0
		i = 0
		best = -1
		A = ord('a')
		for c in s:
			v = ord(c)-A
			if v < 25:
				for j in range(v+1,26):
					if want[j] == 0:
						if need + k - 1 <= n - i - 1:
							best = i
							break
					else:
						if need - 1 <= n - i - 1:
							best = i
							break
			if want[v] == 0:
				want[v] = k - 1
				need += k - 1
			else:
				need -= 1
				want[v] -= 1
			i += 1
		if need == 0:
			print(s)
			continue
		if best == -1:
			print(-1)
			continue
		want = [0]*26
		need = 0
		i = 0
		for c in s:
			v = ord(c)-A
			if i == best:
				res = list(s[:i])
				for j in range(v+1,26):
					if want[j] == 0:
						if need + k - 1 <= n - i - 1:
							need += k - 1
							want[j] = k - 1
							res.append(chr(j+A))
							break
					else:
						if need - 1 <= n - i - 1:
							res.append(chr(j+A))
							want[j] -= 1
							need -= 1
							break
				while need < n - i - 1:
					want[0] += k
					need += k
				for z in range(26):
					for _ in range(want[z]):
						res.append(chr(z+A))
				print(''.join(res))
				break
			if want[v] == 0:
				want[v] = k - 1
				need += k - 1
			else:
				need -= 1
				want[v] -= 1
			i += 1

solve()
