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 maxsize as inf
from collections import Counter as cnt, defaultdict as dic
#from decimal import Decimal as de
#from statistics import median, mode, mean
#from math import pow, log, floor, sqrt, comb, ceil, gcd
#from copy import deepcopy as dc
#from heapq import heappush, heapify, heappop

iin = lambda: int(input())
lin = lambda: list(map(int, input().rstrip().split()))

TEST_CASES = True
def main():
    n = iin()
    a = lin()
    new = set(a)
    if n == 1:
        print(1)
        return
    
    if len(new) == 1:
        print(-1)
        return
    
    if n == 2:
        if a[0]>a[1]:
            print(1)
        elif a[1]>a[0]:
            print(2)
        return
    ans = -1
    mx = max(new)
    for i in range(1,n-1):
        if a[i] == mx:
            if a[i+1] < a[i] or a[i-1] < a[i]:
                print(i+1)
                return
    if mx == a[0]:
        print(1)
    else:
        print(n)
    return
                
    
    
# START
if not TEST_CASES: main()
else: [main() for _ in range(int(input()))]

























