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


def f(n,ais):

    m = max(ais)
    
    for i in range(len(ais)):
        if ais[i] == m:
            if i-1>=0:
                if ais[i-1] < ais[i]:
                    return i+1
            if i+1 < len(ais):
                if ais[i+1] < ais[i]:
                    return i+1
    return -1
for u in range(int(raw_input())):
    n = int(raw_input())
    print f(n,map(int, raw_input().split()))