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

import sys
import collections

input = sys.stdin.readline

T = int(input())
for case in range(T):
    N = int(input())
    a = [int(x) for x in input().split()]
    if N == 1:
        print(1)
        continue
    mx = max(a)
    all = True
    small = [False] * N
    for i in range(N):
        if a[i] != mx:
            small[i] = True
            all = False
    if all:
        print(-1)
    else:
        for i in range(N):
            if i == 0:
                if a[i] == mx and small[i + 1]:
                    print(i + 1)
                    break

            elif i == N - 1:
                if a[i] == mx and small[i - 1]:
                    print(i + 1)
                    break
            else:
                if a[i] == mx and (small[i - 1] or small[i + 1]):
                    print(i + 1)
                    break

