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 collections import *
from itertools import *
from bisect import *

def inp():
    return int(input())
def arrinp():
    return [int(x) for x in input().split()]

def main():
    t = inp()
    for _ in range(t):
        n = inp()
        A = arrinp()
        check = set(A)
        if(len(check)==1):
            print(-1)
            continue
        ele = max(A)
        ans = 0
        #finding edge of group of max eles
        for i in range(len(A)):
            if(A[i]==ele):
                if(i==0):
                    if(A[i+1]!=ele):
                        ans = i
                        break
                elif(i==n-1):
                    if(A[i-1]!=ele):
                        ans = i
                        break
                elif(A[i+1]!=ele or A[i-1]!=ele):
                    ans = i
                    break
        print(ans+1)
                    
        
                


if __name__ == '__main__':
    main()