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.
//package com.example.activitytest;



/*
Command + D  复制当前行到下一行
Command + Delete  删除当前行
Command + R  替换
Command + Option + L  格式化代码
Control + R  编译
  */

import java.util.*;

import java.io.InputStream;
import java.io.*;

import java.lang.*;


public class Main {
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        Long start = System.currentTimeMillis();
        Map<Integer, Integer> mp = new HashMap<Integer, Integer>();
        int[][] cnt = new int[28][];
        //System.out.println(cnt[0].length());


        int T = in.nextInt();
        while (T-- > 0) {
            int n = in.nextInt(), m = in.nextInt();
            String s = in.readString();

            s = " " + s;
            if (n % m != 0) {
                System.out.println(-1);
            } else {
                for (int j = 1; j <= 26; j++) cnt[j] = new int[n + 1];
                for (int i = 1; i <= n; i++) {
                    for (int j = 1; j <= 26; j++) {
                        cnt[j][i] = cnt[j][i - 1];
                        if (s.charAt(i) - 'a' + 1 == j) {
                            cnt[j][i]++;
                        }
                    }
                }
                int flag = 0, big =0,ok = 0;
                for (int i = 1; i <= 26; i++) {
                    if (cnt[i][n] % m != 0) {
                        ok = 1;
                    }
                }
                if (ok == 1) {
                    for (int i = n; i >= 1; i--) {
                        if (s.charAt(i) == 'z') continue;
                        else {
                            for (int od = 2; od <= 30; od++) {
                                int x = s.charAt(i) - 'a' + od;



                                if(x>=27)break;
                                int need[] = new int[27], sum = 0;
                                //System.out.println(x);
                                for (int j = 1; j <= 26; j++) {
                                    if (j == x)
                                        need[j] = m - ((cnt[j][i] + 1) % m);
                                    else if (j == x - od+1) need[j] = m - ((cnt[j][i] - 1) % m);
                                    else need[j] = m - (cnt[j][i] % m);

                                    if (need[j] == m) need[j] = 0;
                                    sum += need[j];
                                    //if(od==4)System.out.print(need[j]+" ");
                                }

                                //if(od==4)System.out.println(sum);
                                if (sum <= n - i) {

                                    for (int k = 1; k <= i - 1; k++) {
                                        System.out.printf("%c", s.charAt(k));
                                    }
                                    System.out.printf("%c", x + 'a' - 1);
                                    //need[x]--;
                                    for (int j = 1; j <= (n - i - sum); j++) {
                                        System.out.printf("a");
                                    }
                                    for (int j = 1; j <= 26; j++) {
                                        for (int k = 1; k <= need[j]; k++)
                                            System.out.printf("%c", j - 1 + 'a');
                                    }
                                    System.out.println();
                                    flag = 1;
                                    break;
                                }
                            }
                            if(flag==1)break;

                        }

                    }


                } else {
                    for (int i = 1; i <= n; i++) System.out.printf("%c", s.charAt(i));
                    System.out.println("");
                }
            }


        }

        //System.out.println("Time=" + (System.currentTimeMillis() - start) + "ms");


    }

    private static int check(int nh, int nm, Map<Integer, Integer> mp, int h, int m) {
        int a1 = nh / 10, a2 = nh % 10, a3 = nm / 10, a4 = nm % 10;
        int b4 = mp.get(a1), b3 = mp.get(a2), b2 = mp.get(a3), b1 = mp.get(a4);
        if (b1 == -1 || b2 == -1 || b3 == -1 || b4 == -1) return 0;
        if (b1 * 10 + b2 < h && b3 * 10 + b4 < m) return 1;
        return 0;

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        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 String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public int nextInt() {
            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 long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long 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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

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

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

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

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


}

