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
        
class SOLVE:
    def solve(self):
        R = stdin.readline
        #f = open('input.txt');R = f.readline
        W = stdout.write
        
        ans = []
        
        for i in range(int(R())):
            n = int(R())
            a = [int(x) for x in R().split()]
            
            if len(set(a)) == 1:
                ans.append('-1')
            else:
                mx  = max(a)
                flg = 1
                for j in range(1, n):
                    if a[j-1] < a[j] and a[j] == mx:
                        ans.append(str(j+1))
                        flg = 0
                        break
                        
                if flg:
                    for j in range(n-1):
                        if a[j] > a[j+1] and a[j] == mx:
                            ans.append(str(j+1))
                            break
        
        W('\n'.join(ans))
        return 0
        
def main():
    s = SOLVE()
    s.solve()
main()