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

T = int(input())
for _ in range(T):
    n = int(input())
    p = list(map(int,input().split()))
    l = [p[0]]*n
    if p == l:
        print(-1)
    else:
        m = max(p)
        if p[0] ==m and p[0]>p[1]:
            print(1)
        elif p[n-1] ==m and p[n-1]>p[n-2]:
            print(n)
        else:
            for j in range(1,n-1):
                if p[j] ==m and p[j]>p[j-1]:
                      print(j+1)
                      break
                elif p[j] ==m and p[j]>p[j+1]:
                      print(j+1)
                      break
 