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;
const int MAXN = 10000;
const int INF = 0x3f3f3f, MOD = 1000000007;
int t;
int n;
int main() {
  cin.tie(0);
  cout.sync_with_stdio(0);
  cin >> t;
  while (t--) {
    cin >> n;
    int a[n + 2];
    a[0] = a[n + 1] = INF;
    int ma = 0;
    for (int i = (1); i < (n + 1); i += 1) {
      cin >> a[i];
      ma = max(ma, a[i]);
    }
    int p = -1;
    for (int i = (1); i < (n + 1); i += 1) {
      if ((a[i] > a[i - 1] || a[i] > a[i + 1]) && a[i] == ma) {
        p = i;
        break;
      }
    }
    cout << p << '\n';
  }
}
