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;
long long maxx, maxj, n, k, t, a[300001];
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> a[0];
    maxx = a[0];
    maxj = 0;
    int flag = 0;
    for (int i = 1; i < n; i++) {
      cin >> a[i];
      if (a[i] != maxx) flag = 1;
      if (a[i] > maxx) {
        maxx = a[i];
        maxj = i;
      }
    }
    if (!flag) {
      cout << "-1" << endl;
      continue;
    }
    cout << maxj + 1 << endl;
  }
}
