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 math
import string
import random
from random import randrange
from collections import deque
from collections import defaultdict

def solve(n, arr):
    ans = 0

    if max(arr) == min(arr):
        print(-1)
        return
    
    k = max(arr)
    
    if arr[0] == k and arr[0]>arr[1]:
        print(1)
        return
    if arr[-1] == k and arr[-1]>arr[-2]:
        print(n)
        return
    
    for i in range(1, n-1):
        if arr[i] == k and (arr[i]>arr[i-1] or arr[i]>arr[i+1]):
            print(i+1)
            return
    
    print(-1)
    return 

def main():
    t = int(input())
    while t>0:
        t-=1
        
        n = int(input())
        # s = input().strip()
        # x,y = map(int, input().strip().split(" "))
        arr = list(map(int, input().strip().split(" ")))
        
        solve(n, arr)
        
    return

def test():
    arr_size = 25
    test_cases = 100
    min_range = -100
    max_range = 100
    str_size = 30
    step = 1
    
    for i in range(test_cases):
        k = []
        # s = ''.join(random.choices(string.ascii_lowercase, k = str_size))
        
        for j in range(arr_size):
            num = randrange(min_range, max_range, step)
            k.append(num)
        
        solve(n, arr)
        print("<-------- DEBUG ----------->")

    return 

if __name__ == '__main__':
    main()
    # test()
        
        