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

#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
#import io,os; input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline #for pypy
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

for _ in range(inp()):
    n = inp()
    x = ip()
    if min(x) == max(x):
        print(-1)
    else:
        mx = max(x)
        for i in range(n):
            if x[i] == mx:
                if i-1>=0 and x[i-1]<x[i]:
                    print(i+1)
                    break
                if i+1<n and x[i+1]<x[i]:
                    print(i+1)
                    break
