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

from sys import stdin,stdout
I = lambda : map(int,stdin.readline().split())
import bisect
import math
from heapq import heappop, heappush
from collections import defaultdict
# t = 1
def testcase():
    n = input()
    a = I()
    if a.count(max(a)) == len(a):
        print -1
        return 
    mx = max(a)
    for i in range(n):
        if a[i] == mx and (a[max(0,i-1)] != mx or a[min(n-1,i+1)] != mx):
            print i + 1
            return
    print -1
            
            
    return
            
t = input() 
for _ in range(t):
    testcase()