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 java.util.*;
import java.io.*;
import java.time.Period;

public class codeforces {
	public static void main(String[] args) throws Exception {

		
		
		int t=sc.nextInt();
	Process:	while(t-->0) {
			int n=sc.nextInt();
			int k=sc.nextInt();
			int[]cou=new int[26];
			int[]ans=new int[26];
			char[]a=sc.next().toCharArray();
			if(n%k!=0) {
				pw.println(-1);
			}else {
				int left=n-Math.min(n, a.length);
				for(int i=0;i<Math.min(n, a.length);i++) {
					cou[a[i]-'a']++;
				}
				int temp=left;
				for(int kk=25;kk>-1;kk--) {
					ans[kk]=((cou[kk]+k-1)/k)*k-cou[kk];
					temp-=ans[kk];
				}
				
				
				
				if(temp>=0&&temp%k==0) {
					
					
					for(int kk=0;kk<Math.min(n, a.length);kk++) {
						pw.print(a[kk]);
						}
						for(int kk=0;kk<temp;kk++)pw.print('a');
						for(int kk=0;kk<26;kk++) {
							for(int jj=0;jj<ans[kk];jj++) {
								pw.print((char)(kk+'a'));
							}
						}
						pw.println();
//					pw.print("*");
					continue Process;
				}
				
				
				for(int i=Math.min(n, a.length)-1;i>-1;i--) {
//					pw.println(Arrays.toString(cou));
					cou[a[i]-'a']--;
					for(int j=a[i]+1;j<='z';j++) {
						cou[j-'a']++;
						 temp=left;
						for(int kk=25;kk>-1;kk--) {
							ans[kk]=((cou[kk]+k-1)/k)*k-cou[kk];
							temp-=ans[kk];
						}
						
//						pw.println(Arrays.toString(ans));
						cou[j-'a']--;
						if(temp>=0&&temp%k==0) {
							for(int kk=0;kk<i;kk++) {
							pw.print(a[kk]);
							}
							pw.print((char)j);
							for(int kk=0;kk<temp;kk++)pw.print('a');
							for(int kk=0;kk<26;kk++) {
								for(int jj=0;jj<ans[kk];jj++) {
									pw.print((char)(kk+'a'));
								}
							}
							pw.println();
							
							continue Process;
						}
					}
					left++;
				}
				
				
				
				
				pw.println(-1);
				
			}
		}
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public long[] nextlongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public Long[] nextLongArray(int n) throws IOException {
			Long[] a = new Long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public Integer[] nextIntegerArray(int n) throws IOException {
			Integer[] a = new Integer[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

	static class pair implements Comparable<pair> {
		long x;
		long y;

		public pair(long x, long y) {
			this.x = x;
			this.y = y;
		}

		public String toString() {
			return x + " " + y;
		}

		public boolean equals(Object o) {
			if (o instanceof pair) {
				pair p = (pair) o;
				return p.x == x && p.y == y;
			}
			return false;
		}

		public int hashCode() {
			return new Long(x).hashCode() * 31 + new Long(y).hashCode();
		}

		public int compareTo(pair other) {
			if (this.x == other.x) {
				return Long.compare(this.y, other.y);
			}
			return Long.compare(this.x, other.x);
		}
	}

	static class tuble implements Comparable<tuble> {
		int x;
		int y;
		int z;

		public tuble(int x, int y, int z) {
			this.x = x;
			this.y = y;
			this.z = z;
		}

		public String toString() {
			return x + " " + y + " " + z;
		}

		public int compareTo(tuble other) {
			if (this.x == other.x) {
				if (this.y == other.y) {
					return this.z - other.z;
				}
				return this.y - other.y;
			} else {
				return this.x - other.x;
			}
		}
	}

	static long mod = 1000000007;
	static Random rn = new Random();
	static Scanner sc = new Scanner(System.in);
	static PrintWriter pw = new PrintWriter(System.out);
}