#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MAX = 10000000000000;
const int mod = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  set<int> s(a, a + n);
  if (s.size() == 1)
    cout << -1 << endl;
  else {
    int max1 = max_element(a, a + n) - a;
    int j = 0;
    for (int i = 0; i < n - 1; i++) {
      if (a[i] == a[max1] && a[i + 1] != a[max1]) {
        j = i + 1;
        break;
      }
    }
    if (j != 0)
      cout << j << endl;
    else
      cout << max1 + 1 << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
