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 main() {
  long long tt;
  cin >> tt;
  while (tt--) {
    long long n;
    cin >> n;
    vector<long long> A(n);
    bool allEqual = true;
    for (long long i = 0; i < n; i++) {
      cin >> A[i];
      if (A[i] != A[0]) {
        allEqual = false;
      }
    }
    if (allEqual && n != 1) {
      cout << "-1\n";
      continue;
    }
    long long dominantIndex = 0, curr = A[0];
    for (long long i = 1; i < n; i++) {
      if (A[i] >= curr) {
        if (curr != A[dominantIndex])
          curr = A[i] + (i);
        else
          curr = A[i];
        dominantIndex = i;
      } else {
        curr++;
      }
    }
    cout << dominantIndex + 1 << endl;
  }
}
