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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Sandip Jana : : :
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.readInt();
            int k = in.readInt();
            char ch[] = in.readString().toCharArray();
            if (n % k != 0) {
                out.println("-1");
                return;
            }


            int prefix[][] = new int[n + 1][26];
            for (int i = 1; i <= n; i++) {
                for (int j = 0; j < 26; j++)
                    prefix[i][j] = prefix[i - 1][j];
                prefix[i][ch[i - 1] - 'a'] += 1;
            }

            boolean valid = true;
            for (int j = 0; j < 26; j++) {
                valid = valid & (prefix[n][j] % k == 0 ? true : false);
            }

            if (valid) {
                out.println(String.valueOf(ch));
                return;
            }

            for (int i = n; i >= 1; i--) {
                char current = ch[i - 1];
                for (char transformed = (char) (current + 1); transformed <= 'z'; transformed++) {

                    int sum[] = Arrays.copyOf(prefix[i], prefix[i].length);
                    --sum[current - 'a'];
                    ++sum[transformed - 'a'];

                    int empty = n - i;
                    int need = 0;
                    for (int c = 0; c < 26; c++) {
                        if (sum[c] % k != 0) {
                            need += (k - sum[c] % k);
                        }
                    }

                    if (need == empty) {
                        generateAnswer(out, ch, i, transformed, 0, sum, k);
                        return;

                    } else if (need < empty) {
                        int blank = empty - need;
                        if (blank % k == 0) {
                            generateAnswer(out, ch, i, transformed, blank, sum, k);
                            return;
                        }
                    }
                }

            }

        }

        private void generateAnswer(PrintWriter out, char[] ch, int i, char transformed, int blank, int sum[], int k) {
            StringBuffer ans = new StringBuffer();
            ans.append(String.valueOf(ch).substring(0, i - 1));
            ans.append(transformed);

            for (int cnt = 0; cnt < blank; cnt++)
                ans.append('a');

            for (int j = 0; j < 26; j++) {
                if (sum[j] % k != 0) {
                    int need = k - sum[j] % k;
                    for (int cnt = 0; cnt < need; cnt++)
                        ans.append((char) (j + 'a'));
                }
            }

            out.println(ans);
            return;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

