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;
const int Max = 100001;
int n;
int solve() {
  cin >> n;
  int max_s = 0;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    max_s = max(max_s, a[i]);
  }
  if (a[0] == max_s && a[1] != max_s) return 1;
  for (int i = 1; i <= n - 1; ++i) {
    if (a[i] == max_s && (max_s != a[i + 1] || max_s != a[i - 1])) return i + 1;
  }
  if (a[n - 1] == max_s && a[n - 2] != max_s) return n - 1;
  return -1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    cout << solve() << endl;
  }
}
