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 p[Max];
bool check(int p[]) {
  for (int i = 1; i < n; ++i)
    if (p[i] != p[i + 1]) return false;
  return true;
}
void solve() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  if (check(p))
    cout << -1 << endl;
  else {
    int index = 1;
    int tmp = p[index];
    for (int i = 2; i <= n; ++i) {
      if (p[index] <= p[i] && p[i] > p[i - 1])
        index = i;
      else if (p[index] <= p[i] && p[i] > p[i + 1] && (i + 1) < n)
        index = i;
    }
    cout << index << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
