1
3
5 3 4
 6
5
5 3 4 4 5
3
1 1 1
5
4 4 3 4 4
5
5 5 4 3 2
3
1 1 2
5
5 4 3 5 5
 1
3
10 1 5

1
 1
-1
2
2
3
1
 1

#include <bits/stdc++.h>
using namespace std;
int t, n;
long long int a[300000];
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
    int pos = 0;
    long long int A = a[0], cnt = 0;
    bool e = true;
    for (int i = 0; i < n; i++)
      if (a[i] != a[0]) e = false;
    if (e) {
      cout << -1 << "\n";
      continue;
    }
    for (int i = 1; i < n; i++) {
      if ((A + cnt) > a[i])
        cnt++;
      else if ((A + cnt) < a[i]) {
        A = a[i];
        pos = i;
      } else {
        pos = i;
        cnt++;
      };
    }
    cout << pos + 1 << "\n";
  }
  return 0;
}
