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 solve() {
  long long n, cnt, ma = INT_MIN;
  cin >> n;
  bool x1 = 0;
  long long v[n];
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (long long i = 0; i < n; i++) {
    if (v[0] != v[i]) {
      x1 = 1;
      break;
    }
  }
  if (!x1) {
    cout << -1 << '\n';
    return;
  }
  for (auto &i : v) {
    ma = max(ma, i);
  }
  for (long long i = 0; i < n; i++) {
    if (ma == v[i]) {
      if (i >= 0 && v[i] > v[i + 1] && i < n - 1) {
        cout << i + 1 << '\n';
        break;
      }
      if (i == n - 1 && v[i] > v[i - 1]) {
        cout << i + 1 << '\n';
        break;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  long long test = 1;
  cin >> test;
  while (test--) {
    solve();
  }
  return 0;
}
