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.
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <vector>
#include <cstring>
#include <cmath>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <ctime>
#include <limits>
#include <queue>
#include <set>
#include <map>
using namespace std;

#define MAX 2000000000ll
#define F(a, b) f[a + 1][b + 1]
#define SetBreak(a, b) if (i == a && j == b)
#define eps 1e-9
#define CLOCKS_PER_SECOND ((clock_t)1000)
#define ll_max numeric_limits<long long>::max();
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define sz(x) (int)(x).size()
#define max(a,b) ((a) < (b) ? (b) : (a))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define Access(v, pos) (((v) >> (pos)) & 1)
#define ValidPos(a,b) ((a) >= 0 && (a) < n && (b) >= 0 && (b) < m) 
#define Serialize(a,b) ((a) * m + (b))
#define For(i,j) for( int (i) = 1 ; (i) <= (j) ; ++(i) )
#define Fork(i,j,k) for( int (i) = (k) ; (i) <= (j) ; ++(i) )
#define For0(i,j) for( int (i) = 0 ; (i) < (j) ; ++(i) )
#define For0k(i,j,k) for( int (i) = (k); (i) < (j) ; ++(i) )

typedef long long ll;
typedef vector<int> vci;
typedef pair<int, int> pii;
template <typename T> void UpdateMax(T& a, T b) {if (a < b) a = b;}
template <typename T> void UpdateMin(T& a, T b) {if (a > b) a = b;}
template<typename T>
inline void read(T &x)
{
    x = 0; char c = getchar(); int flag = 1;
    while(!isdigit(c)) {if (c == '-') flag = -1; c = getchar();}
    while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
    x *= flag;
}
template<typename T>
void Unique(vector<T>& vec)
{
    sort(vec.begin(), vec.end());
    vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template<typename T>
void Relabel(vector<T>& vec, T& value)
{
    value = lower_bound(vec.begin(), vec.end(), value) - vec.begin() + 1;
}
template <typename T, typename V> void Print(const pair<T, V>& x) { cout<<x.first<<" @ "<<x.second<<" | "; }
template <typename T> void Print(const T& x) { cout<<x<<" ";  }
template <typename T> void Pcon(const T& x) { cout<<"\nsize: "<<x.size()<<endl; for (const auto& item : x) Print(item); }
std::vector<int> LABS;
template <typename T> void Print(const T* x, int offset, int loop)
{
    for (int i = 0; i <= loop; i++)
    {
        cout<<"[";
        for (int item : LABS)
            cout<<item - offset<<",";
        cout<<i - offset<<"]:";
        cout<<x[i]<<" ";
    }
}
template <typename T, typename... Args>
void Print(const T* f, int offset, int loop, Args... args)
{
    for (int i = 0; i <= loop; i++)
    {
        LABS.push_back(i);
        Print(f[i], offset, args...);
        cout<<endl;
        LABS.pop_back();
    }
}
template <typename T, typename V>
bool Has(T& cluster, const V& item)
{
    return cluster.find(item) != cluster.end();
}
int Logn(ll x) { int cnt = 0; while (x) { ++cnt; x >>= 1; } return cnt; }
//////////////////////////////////////////////////////
const int MOD = 1e9 + 7;
const int N = 2e5 + 5;
const int dir[4][2] = {{-1, 0}, {0, -1}, {1, 0}, {1, 0}};
struct Edg {int x, y, z;friend bool operator < (const Edg& lhs, const Edg& rhs){return lhs.z < rhs.z;}} edg[N];
bool vis[N], used[N];
clock_t start_time;
int t, n, m;
int f[26];
vci G[N];
//////////////////////////////////////////////////////
inline void SetClock() { start_time = clock(); }
bool TimeOut(size_t ms) { if (1000*(clock() - start_time) >= ms * CLOCKS_PER_SECOND) return true; return false; }
inline pii DeSerialize(int c) { return {(c) / m, (c) % m}; }
template <typename T, typename V>
inline void Add(T& v, const V& delta) { v += delta; if (v >= MOD) v -= MOD; }
template <typename T, typename V>
inline void Dec(T& v, const V& delta) { v -= delta; if (v < 0) v += MOD; }
//////////////////////////////////////////////////////
int T, k;
string s;
bool check(int left) {
    for (int i = 0; i < 26; ++i) {
        left -= (k - (f[i] % k)) % k;
        if (left < 0) {
            return false;
        }
    }
    return left % k == 0;
}
int main()
{
    srand(time(0));
    SetClock();
    cin.sync_with_stdio(false);
    //freopen("test.in", "r", stdin);
    cin>>T;
    while (T--) {
        cin>>n>>k;
        cin>>s;        
        if (n % k != 0) {
            cout<<-1<<endl;
            continue;
        }
        memset(f, 0, sizeof(f));
        for (int i = 0; i < n; ++i) {
            ++f[s[i] - 'a'];
        }
        if (check(0)) {
            cout<<s<<endl;
            continue;
        }
        int cursor = -1;
        for (int i = n - 1; i >= 0 && cursor == -1; --i) {
            --f[s[i] - 'a'];
            for (char j = s[i] + 1; j <= 'z'; ++j) {
                ++f[j - 'a'];
                if (check(n - i - 1)) {
                    cursor = i;
                    s[i] = j;
                    break;
                }
                --f[j - 'a'];
            }            
        }
        if (cursor == -1) {
            cout<<-1<<endl;
            continue;
        }        
        for (int i = cursor + 1; i < n; ++i) {
            for (char j = 'a'; j <= 'z'; ++j) {
                s[i] = j;
                ++f[j - 'a'];
                if (check(n - i - 1)) {
                    break;
                }
                --f[j - 'a'];
            }            
        }        
        cout<<s<<endl;
    }
}
