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 INPUT() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  INPUT();
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i <= n - 1; i++) cin >> a[i];
    int maxi = -1;
    for (int i = 0; i <= n - 1; i++) {
      maxi = max(maxi, a[i]);
    }
    int pass = 0;
    for (int i = 0; i <= n - 1; i++) {
      if ((a[i] == maxi) and ((i == 0) and (a[i + 1] < maxi))) {
        cout << 1 << "\n";
        pass = 1;
        break;
      }
      if ((a[i] == maxi) and ((i == n - 1) and (a[i - 1] < maxi))) {
        cout << n << "\n";
        pass = 1;
        break;
      }
      if ((a[i] == maxi) and ((a[i - 1] < maxi) or (a[i + 1] < maxi))) {
        cout << i + 1 << "\n";
        pass = 1;
        break;
      }
    }
    if (pass == 0) cout << -1 << "\n";
  }
}
