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
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
import threading
import sys
import time

def get_int(): return int(stdin.readline().strip())
def get_tuple(): return map(int, stdin.readline().split())
def get_list(): return list(map(int, stdin.readline().split()))


def solve():
    n = get_int()
    ls = get_list()
    mi = max(ls)
    ans = -1
    for i,v in enumerate(ls):
        if v==mi:
            if i>0 and ls[i-1]<mi:
                ans = i+1
                break
            elif i<n-1 and ls[i+1]<mi:
                ans = i+1
                break
    print(ans)




def main():
    solve()


TestCases = True

if TestCases:
    for i in range(get_int()):
        main()
else:
    main()
