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,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
# sys.setrecursionlimit(5*10**5)
inf = 10**12
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return list(input().split())
def S(): return input()

def solve():
    n = II()
    a_list = LI()
    if len(set(a_list)) == 1:
        return -1
    
    a_max = max(a_list)
    for i in range(n):
        if a_list[i] != a_max:
            continue
        if (i>0 and a_list[i-1] != a_max) or (i<n-1 and a_list[i+1] != a_max):
            return i + 1
    

def main():
    t = II()
    res = list()
    for _ in range(t):
        res.append(solve())
    for ans in res:
        print(ans)
    return 0

main()