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

t = int(input())
for _ in range(t):
    
    n = int(input())
    
    lol = [int(n) for n in input().split()]
    
    if(len(list(set(lol)))==1):
        print(-1)
    else:
        x = max(lol)
        for i in range(len(lol)):
            if(i==0):
                if(lol[i]==x and lol[i+1] < lol[i]):
                    print(i+1)
                    break
                else:
                    continue
            if(i == n-1):
                if(lol[i]==x and lol[i] > lol[i-1]):
                    print(i+1)
                    break
                else:
                    continue
            else:
                if(lol[i]==x and (lol[i-1] < x or lol[i+1] < x)):
                    
                    
                    print(i+1)
                    break
                else:
                    continue
                        
                    
        
        