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 rl():
    return list(map(int,input().split()))
def arp(arr):
    return ' '.join([str(i) for i in arr])

from collections import deque,Counter
from math import ceil,sqrt,log2,log,floor

for _ in range(int(input())):
    n, = rl()
    arr = rl()
    if len(set(arr))==1:
        print(-1)
    else:
        m = max(arr)
        for i in range(1,n):
            if arr[i-1]!=arr[i]:
                if arr[i-1]==m or arr[i]==m:
                    if arr[i-1]==m:
                        print(i)
                        break
                    else:
                        print(i+1)
                        break
        