#define _CRT_SECURE_NO_WARNINGS

#include<iostream>
#include<random>
#include <cstdio>
#include<cassert>
#include <fstream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <iomanip>
#include <cstring>
#include <locale>
#include <unordered_map>
#include<unordered_set>
#include<bitset>
#include<stack>
#define pb push_back
#define mp make_pair
#define sz(a) int((a).size())
#define all(x) (x).begin(),(x).end()
#define forn(i, e, n) for(int i = e; i < int(n); i++)
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define ff first
#define ss second
using namespace std;
mt19937 rnd(time(NULL));
typedef long long  ll;
typedef ll Hash;
typedef long double ld;
typedef pair<int, int> pt;
typedef pair<ll, ll> pll;
const ll INF64 = ll(1e18);
const int INF = int(1e9) + 7;
const int MOD = int(1e9) + 7;
const int MAXN = 5 * 1e5 + 100;

void solve()
{
    ll n, k;
    cin >> n >> k;
    vector<ll> h(n);
    forn(i, 0, n)
        cin >> h[i];
    forn(i, 0, n - 1)
    {
        if (h[i] < h[i + 1])
        {
            int r = i;
            int l = i;
            while (true)
            {
                while (l > 0 && h[l - 1] == h[l])
                    l--;
                int cnt = r - l + 1;
                if (k <= cnt)
                {
                    cout << l + (cnt - k)  + 1 << '\n';
                    return;
                }
                h[l]++;
                if(l != r)
                    h[r]++;
                k -= cnt;
                if (h[r] == h[r + 1])
                    break;
            }
            forn(i, l, r + 1)
                h[i] = h[r];
        }
    }
    cout << -1 << '\n';
}

int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(10);
    int t;
    cin >> t;
    forn(i, 0, t)
        solve();
    return 0;
}
