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 N = 1e5 + 1;
void testcase() {
  int n;
  cin >> n;
  vector<long long> arr(n + 2, 0);
  for (int i = 1; i <= n; i++) cin >> arr[i];
  int pivot = 0;
  for (int i = 1; i <= n; i++) {
    if ((i > 1 && arr[i] > arr[i - 1]) || (i < n && arr[i] > arr[i + 1]))
      if (arr[pivot] < arr[i]) pivot = i;
  }
  int check = 1;
  int l = pivot;
  int r = pivot;
  while (l != 1 && r != n) {
    if (l > 1 && arr[pivot] > arr[l - 1]) {
      --l;
      ++arr[pivot];
    }
    if (r < n && arr[pivot] > arr[r + 1]) {
      ++arr[pivot];
      ++r;
    }
    if (arr[pivot] <= arr[l] && arr[pivot] <= arr[r]) {
      check = 0;
      break;
    }
  }
  if (check)
    cout << pivot << endl;
  else
    cout << -1 << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    testcase();
  }
}
