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

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



