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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;

public final class C {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final PrintWriter pw = new PrintWriter(System.out);
        final int q = fs.nextInt();
        for (int query = 0; query < q; query++) {
            final int n = fs.nextInt();
            final int k = fs.nextInt();
            final String s = fs.next();
            if (n % k != 0) {
                pw.println(-1);
                continue;
            }
            final int[] freq = new int[26];
            for (int c : s.toCharArray()) {
                freq[c - 'a'] += 1;
            }
            outer:
            for (int i = n - 1; i >= 0; i--) {
                final int x = s.charAt(i) - 'a';
                final int MIN = i == n - 1 ? x : x + 1;
                for (int j = MIN; j < 26; j++) {
                    freq[x] -= 1;
                    freq[j] += 1;
                    int fixes = 0;
                    for (int c = 0; c < 26; c++) {
                        fixes += (k - (freq[c] % k)) % k;
                    }
                    if (fixes <= n - 1 - i) {
                        //we have an answer!
                        final List<Character> ans = new ArrayList<>();
                        for (int c = 0; c < 26; c++) {
                            int f = (k - (freq[c] % k)) % k;
                            while (f > 0) {
                                ans.add((char) (c + 'a'));
                                f--;
                            }
                        }
                        int as = n - 1 - i - fixes;
                        while (as > 0) {
                            ans.add('a');
                            as--;
                        }
                        Collections.sort(ans);
                        final StringBuilder res = new StringBuilder();
                        res.append(s, 0, i);
                        res.append((char) (j + 'a'));
                        for (char c : ans) {
                            res.append(c);
                        }
                        pw.println(res);
                        break outer;
                    }
                    freq[x] += 1;
                    freq[j] -= 1;
                }
                freq[x] -= 1;
            }
        }
        pw.close();
    }

    static final class Utils {
        private static class Shuffler {
            private static void shuffle(int[] x) {
                final Random r = new Random();

                for (int i = 0; i <= x.length - 2; i++) {
                    final int j = i + r.nextInt(x.length - i);
                    swap(x, i, j);
                }
            }

            private static void shuffle(long[] x) {
                final Random r = new Random();

                for (int i = 0; i <= x.length - 2; i++) {
                    final int j = i + r.nextInt(x.length - i);
                    swap(x, i, j);
                }
            }

            private static void swap(int[] x, int i, int j) {
                final int t = x[i];
                x[i] = x[j];
                x[j] = t;
            }

            private static void swap(long[] x, int i, int j) {
                final long t = x[i];
                x[i] = x[j];
                x[j] = t;
            }
        }

        public static void shuffleSort(int[] arr) {
            Shuffler.shuffle(arr);
            Arrays.sort(arr);
        }

        public static void shuffleSort(long[] arr) {
            Shuffler.shuffle(arr);
            Arrays.sort(arr);
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
}
