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 int M = 300000 + 5;
int a[M];
int main() {
  a[0] = 1000 * 1000 * 1000;
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    a[n + 1] = 1000 * 1000 * 1000;
    cin >> a[1];
    bool nemishe = 1;
    int mx = a[1];
    for (int i = 2; i <= n; i++) {
      cin >> a[i];
      if (a[i] != a[i - 1]) {
        nemishe = 0;
      }
      mx = max(mx, a[i]);
    }
    if (nemishe) {
      cout << "-1\n";
      continue;
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] == mx && (a[i] > a[i - 1] || a[i] > a[i + 1])) {
        mx = i;
        break;
      }
    }
    cout << mx << '\n';
  }
  return 0;
}
