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 farr(s):
    all_freq = {}
    for i in s:
        if i in all_freq:
            all_freq[i] += 1
        else:
            all_freq[i] = 1
    return all_freq

def nextInt():
    return int(input())
def intArr():
    arr = input().split(" ")
    return [int(x) for x in arr]

t = nextInt()
ans = []
for tt in range(t):
    n = nextInt()
    arr = intArr()
    if len(farr(arr))==1:
        ans.append(-1)
    elif len(arr) == 2:
        if arr[0] > arr[1]:
            ans.append(1)
        else:
            ans.append(2)
    else:
        m = max(arr)
        for x in range(len(arr)):
            if x == 0 and arr[x]==m and arr[x]>arr[x+1]:
                ans.append(x+1)
                break
            elif x!=0 and x!=len(arr)-1 and arr[x]==m and x!=len(arr)-1 and (arr[x]>arr[x+1] or arr[x]>arr[x-1]):
                ans.append(x+1)
                break
            elif x==len(arr)-1 and arr[x]==m and arr[x]>arr[x-1]:
                ans.append(x+1)
                break
for x in ans:
    print(x)
