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;
long long int gcd(long long int a, long long int b) {
  if (a == 0)
    return (b);
  else
    return (gcd(b % a, a));
}
int modularexpo(long long int a, long long int b, long long int c) {
  if (a == 0) {
    return 0;
  }
  if (b == 0) {
    return 1;
  } else {
    if (b % 2 == 0) {
      long smallans = modularexpo(a, b / 2, c);
      int ans = ((smallans % c) * (smallans % c)) % c;
      return (ans + c) % c;
    } else {
      long smallans = modularexpo(a, b - 1, c);
      long ans = a % c;
      ans = ((ans % c) * (smallans % c)) % c;
      return (ans + c) % c;
    }
  }
}
long combination(int n, int r) {
  long long ans = 1;
  r = r > n - r ? n - r : r;
  int j = 1;
  for (; j <= r; j++, n--) {
    if (n % j == 0) {
      ans *= n / j;
    } else if (ans % j == 0) {
      ans = ans / j * n;
    } else {
      ans = (ans * n) / j;
    }
  }
  return ans;
}
int binary(int* arr, int l, int r, int x) {
  while (l <= r) {
    int mid = (l + r) / 2;
    if (arr[mid] == x) {
      return mid;
    } else if (arr[mid] < x) {
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  return -1;
}
int main() {
  int t;
  std::cin >> t;
  while (t--) {
    int n;
    std::cin >> n;
    int* arr = new int[n];
    for (int i = 0; i < n; i++) {
      std::cin >> arr[i];
    }
    int v = arr[0];
    int flag = 0;
    for (int i = 1; i < n; i++) {
      if (v != arr[i]) {
        flag = 1;
      }
    }
    if (flag == 0) {
      std::cout << "-1" << endl;
      continue;
    }
    int prev = arr[0];
    int d = -1;
    for (int i = 0; i < n - 1; i++) {
      if (prev < arr[i + 1]) {
        prev = arr[i + 1] + i + 1;
        d = i + 1;
      } else if (prev == arr[i] && prev > arr[i + 1]) {
        prev = arr[i] + i + 1;
        d = i;
      } else if (prev > arr[i]) {
        prev += 1;
      }
    }
    std::cout << d + 1 << endl;
  }
  return 0;
}
