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 a[1000001]{0};
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, max = 0, ans = -1;
    cin >> n;
    a[0] = 1e9;
    a[n + 1] = 1e9;
    for (int q = 1; q <= n; q++) {
      cin >> a[q];
      if (a[q] > max) max = a[q];
    }
    for (int u = 1; u <= n; u++) {
      if (a[u] == max && (a[u] > a[u + 1] || a[u] > a[u - 1])) {
        ans = u;
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
