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 solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  int mx = INT_MIN;
  for (auto &it : a) {
    cin >> it;
    if (it > mx) mx = it;
  }
  int idx = -1;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != mx) continue;
    if (i == 0) {
      if (a[i + 1] != mx) idx = i;
    } else if (i == a.size() - 1) {
      if (a[i - 1] != mx) idx = i;
    } else {
      if (a[i + 1] != mx || a[i - 1] != mx) idx = i;
    }
  }
  cout << idx + 1 << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  for (int t = 1; t <= tc; t++) {
    solve();
  }
}
