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, n, sum;
  cin >> t;
  while (t--) {
    sum = 0;
    cin >> n;
    int p = 0;
    int x, mx, h = 0, maxx;
    cin >> mx;
    maxx = mx;
    for (int i = 1; i < n; i++) {
      cin >> x;
      if (mx != x) {
        p++;
      }
      if (p && mx < x) {
        mx = x;
        h = i;
      }
      if (!p && mx == x) {
        mx = x;
        h = i;
      }
    }
    if (!p)
      cout << -1 << endl;
    else
      cout << h + 1 << endl;
  }
  return 0;
}
