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

for _ in range(int(input())):
    n = int(input())
    x = list(map(int, input().split()))
    mx = -1
    mxi = -1
    if len(set(x)) == 1:
        print(-1)
        continue
    for i in range(len(x)):
        if mx < x[i]:
            if 0 < i < len(x) - 1:
                if x[i - 1] != x[i] or x[i] != x[i + 1]:
                    mx = x[i]
                    mxi = i
            if i == 0:
                if x[i] != x[i + 1]:
                    mx = x[i]
                    mxi = i
            if i == len(x) - 1:
                if x[i] != x[i - 1]:
                    mx = x[i]
                    mxi = i
    print(mxi + 1)