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;
void explore_adj(vector<vector<int>> &v, int i, int j, int W, int H) {
  vector<vector<int>> dir = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
  for (int x = 0; x < 4; x++) {
    int di = dir[x][0] + i;
    int dj = dir[x][1] + j;
    if (di < 0 || dj < 0) {
      continue;
    } else if (di > W || dj > H) {
      continue;
    } else {
    }
  }
}
int findDepth(int x, int depth, vector<int> &v) {
  if (x == -1) {
    return depth;
  }
  return findDepth(v[x - 1], depth + 1, v);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v(n);
    int largest = 0;
    for (int i = 0; i < n; i++) {
      int temp;
      cin >> temp;
      v[i] = temp;
      largest = max(temp, largest);
    }
    int answer = 0;
    int a = v[0];
    bool changed = false;
    for (int i = 0; i < n; i++) {
      if (v[i] != a) changed = true;
      if (v[i] == largest) {
        if (i == 0) {
          if (v[i] > v[i + 1]) answer = i;
        } else if (i == n - 1) {
          if (v[i] > v[i - 1]) answer = i;
        } else {
          if (v[i] > v[i - 1] || v[i] > v[i + 1]) answer = i;
        }
      }
    }
    cout << (changed == false ? -1 : answer + 1) << endl;
  }
  return 0;
}
