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>
const long double PI = 3.141592653589793236L;
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool is_valid = false;
  for (int i = 1; i < n; i++) {
    if (a[i] != a[i - 1]) {
      is_valid = true;
      break;
    }
  }
  if (!is_valid) {
    cout << "-1\n";
    return;
  }
  long long int max = *max_element(a.begin(), a.end());
  for (int i = 0; i < n; i++) {
    if (a[i] != max) {
      continue;
    }
    if (i == 0) {
      if (a[i + 1] < a[i]) {
        cout << i + 1 << "\n";
        return;
      }
    } else if (i == n - 1) {
      if (a[i - 1] < a[i]) {
        cout << i + 1 << "\n";
        return;
      }
    } else {
      if (a[i + 1] < a[i] || a[i - 1] < a[i]) {
        cout << i + 1 << "\n";
        return;
      }
    }
  }
  assert(false);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
