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;
const long long N = 300010;
long long arr[N];
long long power_mod(long long x, long long y) {
  x %= 1000000007;
  long long res = 1;
  while (y) {
    if (y & 1) {
      res = (res * x) % 1000000007;
    }
    y /= 2;
    x = (x * x) % 1000000007;
  }
  return res;
}
void solve() {
  long long n, ma = 0, mi = 1000000000, ans = -1;
  cin >> n;
  for (long long i = 1, a; i <= n; i++) {
    cin >> arr[i];
    a = arr[i];
    mi = min(a, mi);
    ma = max(a, ma);
  }
  if (mi == ma) {
    cout << "-1\n";
    return;
  }
  if (arr[1] == ma and arr[2] != ma) {
    cout << "1\n";
    return;
  }
  if (arr[n] == ma and arr[n - 1] != ma) {
    cout << n << "\n";
    return;
  }
  for (long long i = 2; i <= n - 1; i++) {
    if (arr[i] == ma) {
      cout << i << "\n";
      return;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tc = 1;
  cin >> tc;
  while (tc--) {
    solve();
  }
  return 0;
}
