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;
long long max(long long arr[], int size) {
  long long maximum = arr[0];
  for (int i = 0; i < size; i++) {
    if (arr[i] > maximum) maximum = arr[i];
  }
  return maximum;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, i, j;
    long long mx = -1;
    long long res = -1;
    cin >> n;
    long long b[n];
    for (i = 1; i <= n; i++) {
      cin >> b[i];
      mx = max(mx, b[i]);
    }
    b[0] = 1e9;
    b[n + 1] = 1e9;
    int flag = 0;
    for (i = 1; i <= n; i++) {
      if (b[i] == mx && (b[i] > b[i - 1]) || (b[i] > b[i + 1])) res = i;
    }
    cout << res << endl;
  }
  return 0;
}
