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 static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.io.*;
import java.util.*;

public class A
{
    static int n, k;
    static int[] arr;
    static char[] s;
    public static void main(String[] args) throws IOException
    {
        f = new Flash();
        out = new PrintWriter(System.out);
        
        int T = ni();
        for(int tc = 1; tc <= T; tc++){
            n = ni(); k = ni(); s = nc(); sop(fn());
        }
        
        out.flush(); out.close();
    }
    
    static String fn()
    {
    	if(n%k != 0) return "-1";
        int[][] cnt = new int[n][26];
        for(int i = 0; i < n; i++) {
        	cnt[i][s[i]-'a']++;
        	if(i > 0) {
        		for(int j = 0; j < 26; j++) {
        			cnt[i][j] += cnt[i-1][j];
        		}
        	}
        }
        
        if(check(cnt)) return new String(s);
        
        for(int i = n-1; i >= 1; i--) {
        	for(int j = (s[i-1]-'a')+1; j < 26; j++) {
        		cnt[i-1][s[i-1]-'a'] -= 1;
        		cnt[i-1][j] += 1;
            	
            	int sum = 0;
            	int[] need = new int[26];
            	for(int c = 0; c < 26; c++) {
            		if(cnt[i-1][c] == 0 || cnt[i-1][c] % k == 0) continue;
            		int req = k-(cnt[i-1][c] % k);
            		need[c] = req;
            		sum += req;
            	}
            	
            	//sop(Arrays.toString(need));
            	cnt[i-1][s[i-1]-'a'] += 1;
            	cnt[i-1][j] -= 1;
            	
            	if(sum > (n-i)) continue;
            	if(((n-i)-sum) % k != 0) continue;
            	
            	int idx = i;
            	for(int t = 1; t <= (n-i)-sum; t++) s[idx++] = 'a';
            	for(int c = 0; c < 26; c++) {
            		for(int t = 1; t <= need[c]; t++) {
            			s[idx++] = (char)('a'+c);
            		}
            	}
            	
            	s[i-1] = (char)('a'+j);
            	return new String(s);
        	}
        }
        
        return new String(s);
    }
    
    static boolean check(int[][] cnt) {
    	boolean ok = true;
        for(int i = 0; i < 26; i++) {
        	ok &= (cnt[n-1][i]%k == 0);
        }if(ok) return true;
        
        for(int i = (s[n-1]-'a')+1; i < 26; i++) {
        	cnt[n-1][s[n-1]-'a'] -= 1;
        	cnt[n-1][i] += 1;
        	
        	ok = true;
            for(int c = 0; c < 26; c++) {
            	ok &= (cnt[n-1][c]%k == 0);
            }
            
            if(ok) {
            	s[n-1] = (char)('a'+i);
            	return true;
            }
        	
        	cnt[n-1][s[n-1]-'a'] += 1;
        	cnt[n-1][i] -= 1;
        }
        
        return false;
    }
    
    static Flash f;
    static PrintWriter out;
    static final long mod = (long)1e9+7;
    static final long inf = Long.MAX_VALUE;
    static final int _inf = Integer.MAX_VALUE;
    static final int maxN = (int)5e5+5;
    static long[] fact, inv;
    
    static void sort(int[] a){
        List<Integer> A = new ArrayList<>();
        for(int i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static void sort(long[] a){
        List<Long> A = new ArrayList<>();
        for(long i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static void print(int[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        sop(sb);
    }
    
    static void print(long[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        sop(sb);
    }
    
    static int swap(int itself, int dummy){return itself;}
    static long swap(long itself, long dummy){return itself;}
    static void sop(Object o){out.println(o);}
    static int ni(){return f.ni();}
    static long nl(){return f.nl();}
    static double nd(){return f.nd();}
    static String next(){return f.next();}
    static String ns(){return f.ns();}
    static char[] nc(){return f.nc();}
    static int[] arr(int len){return f.arr(len);}
    static int gcd(int a, int b){if(b == 0) return a; return gcd(b, a%b);}
    static long gcd(long a, long b){if(b == 0) return a; return gcd(b, a%b);}
    static int lcm(int a, int b){return (a*b)/gcd(a, b);}
    static long lcm(long a, long b){return (a*b)/gcd(a, b);}
    
    static class Flash
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        
        String next(){
            while(!st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(IOException e){
                    e.printStackTrace();
                }
            }
            
            return st.nextToken();
        }
        
        String ns(){
            String s = new String();
            try{
                s = br.readLine().trim();
            }catch(IOException e){
                e.printStackTrace();
            }
            
            return s;
        }
        
        int[] arr(int n){
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = ni();
            return a;
        }
        
        char[] nc(){return ns().toCharArray();}
        int ni(){return Integer.parseInt(next());}
        long nl(){return Long.parseLong(next());}
        double nd(){return Double.parseDouble(next());}
    }
}