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 n, i, a[10000], dem[10000], res[10000], td, j, m;
int main() {
  cin >> m;
  for (j = 0; j < m; j++) {
    cin >> n;
    dem[j] = 0;
    for (i = 1; i <= n; i++) cin >> a[i];
    res[j] = 1;
    td = a[1];
    for (i = 2; i <= n; i++) {
      if (td < a[i]) {
        td = a[i];
        res[j] = i;
      }
    }
    for (i = 2; i < n; i++) {
      if (a[i] != a[i - 1]) dem[j]++;
    }
  }
  for (j = 0; j < m; j++) {
    if (dem[j] != 0)
      cout << res[j] << "\n";
    else
      cout << -1 << "\n";
  }
  return 0;
}
