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;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, a[300005], ma = 0, p = 0, f = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] > ma) {
        ma = a[i];
        p = i;
      }
    }
    for (int i = 0; i < n - 1; i++) {
      if (a[i] - a[i + 1] != 0) f = 1;
    }
    if (f == 1)
      cout << p + 1 << endl;
    else
      cout << "-1" << endl;
  }
  return 0;
}
