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;
void giai() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int maxx = a[0];
  int ind = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] > maxx) {
      maxx = a[i];
      ind = i;
    }
  }
  int cnt = 0;
  for (int i = 0; i < n; i++)
    if (a[i] == maxx) cnt++;
  if (cnt == n)
    cout << -1 << endl;
  else {
    ind = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] == maxx) {
        if ((i > 0 && a[i - 1] != maxx) || (i + 1 < n && a[i + 1] != maxx)) {
          cout << i + 1 << endl;
          return;
        }
      }
    }
    cout << -1 << endl;
  }
}
int main() {
  long long g;
  cin >> g;
  while (g--) {
    giai();
  }
}
