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 mod = 1e9 + 7;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b)) * b;
}
bool isPrime(long long int n) {
  if (!(n & 1) && n > 2) return false;
  for (long long int i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second > b.second);
}
string getBinString(int i, int k) {
  string s = "";
  for (long long int j = 0; j < k; j++) {
    s = (char)(i % 2 + '0') + s;
    i /= 2;
  }
  return s;
}
vector<int> vis(1e6 + 1, 0), in(1e6 + 1, 0), low(1e6 + 1, 0);
int timer = 0;
int articulation_points = 0;
map<int, vector<int> > graph;
int flag = 0;
void dfs(int node, int par) {
  vis[node] = 1;
  in[node] = low[node] = timer++;
  int child = 0;
  for (auto x : graph[node]) {
    if (x == par) continue;
    if (vis[x]) {
      low[node] = min(low[node], in[x]);
    } else {
      dfs(x, node);
      if (low[x] >= in[node] && par != -1) articulation_points++;
      low[node] = min(low[node], low[x]);
      child++;
    }
  }
  if (par == -1 && child > 1) articulation_points++;
  return;
}
int bfs(int index, int dist) {}
void calc() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    int index = -1, ma = -1;
    int fl = 0;
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      ma = max(ma, a[i]);
    }
    for (long long int i = 0; i < n; i++) {
      if (ma == a[i] &&
          ((i < n && a[i + 1] != a[i]) || (i > 0 && a[i - 1] != a[i]))) {
        index = i + 1;
        break;
      }
    }
    cout << index << endl;
  }
  return 0;
}
