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

# a11.py
for _ in range(int(input())):
    n = int(input())
    a = list(map(int,input().split()))
    # cnt = 0
    # i = 0
    # while i<n and a[i]!=1:
    #     i+=1
    # p = n-1
    # while p>=0 and a[p]!=1:
    #     p-=1
    # for j in range(i+1,p):
    #     if a[j] == 0:
    #         cnt+=1
    # print(cnt)

    x = a[0]
    cnt = 0
    ans = -10e9
    for i in range(n):
        if a[i]==x:
            cnt+=1
        ans = max(ans,a[i])

    if cnt==n:
        print(-1)
    else:
        ok = False
        for i in range(1,n):
            if a[i]==ans and a[i-1]!=ans:
                ok = True
                print(i+1)
                break
        if not ok:
            for i in range(n-1):
                if a[i]==ans and a[i+1]!=ans:
                    print(i+1)
                    break
                
