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 yeahtiger[300005];
int main() {
  int n, T;
  bool gg;
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    int mx = 0;
    gg = false;
    for (int i = 1; i <= n; ++i)
      scanf("%d", yeahtiger + i), mx = max(mx, yeahtiger[i]);
    for (int i = 1; i <= n; ++i) {
      if (yeahtiger[i] != mx) {
        gg = true;
        break;
      }
    }
    if (!gg) {
      puts("-1");
      continue;
    }
    for (int i = 1; i <= n; ++i) {
      if (mx == yeahtiger[i]) {
        printf("%d\n", i);
        break;
      }
    }
  }
  return 0;
}
