#include <bits/stdc++.h>
using namespace std;
int yeahtiger[300005];
int main() {
  int n, T;
  bool gg, ok;
  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;
    }
    ok = false;
    for (int i = 1; i <= n; ++i) {
      if (mx == yeahtiger[i]) {
        if (i == 1) {
          if (mx == yeahtiger[i + 1])
            ok = false;
          else
            ok = true;
        } else if (i == n) {
          if (mx == yeahtiger[i - 1])
            ok = false;
          else
            ok = true;
        } else {
          if (mx == yeahtiger[i - 1] && mx == yeahtiger[i + 1])
            ok = false;
          else
            ok = true;
        }
        if (ok) {
          printf("%d\n", i);
          break;
        }
      }
    }
  }
  return 0;
}
