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
for _ in range(int(input())):
    a = int(input())
    b = list(map(int,input().split()))
    if a==1:
        print(1)
        sys.exit()
    c = max(b)
    ans = -1
    for i in range(a):
        if b[i]==c:
            f = False
            if i<a-1 and b[i]>b[i+1]:
                f = True
            else:
                f = False
            if i>0 and b[i]>b[i-1]:
                f = True
            elif not f:
                f = False
            if f:
                ans = i+1
                break
    print(ans)
                
