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

import sys, os
from sys import stdin as sysstdin

# sysstdin = open(os.getcwd()+'\input.txt', 'r')  

t = int(sysstdin.readline().strip())

for _ in range(0,int(t)):
    n = int(sysstdin.readline().strip())
    a = [int(x) for x in sysstdin.readline().split()]
    m = max(a)
    idx = [i for i, j in enumerate(a) if j == m]
    # print(n, a, m)
    if len(idx) == n:
        print(-1)
        continue
    for i, ind in enumerate(idx):
        if ind == 0:
            if a[ind + 1] != m:
                # print('here1')
                print(ind+1)
                break
        elif ind == n - 1:
            if a[ind - 1] != m:
                # print('here2')
                print(ind+1)
                break
        elif a[ind - 1] != m or a[ind + 1] != m:
            # print('here3', ind)
            print(ind+1)
            break