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

# Codeforces Submission
# User :    NightSentinel
# Time :    20:14:12
# Date :    20/10/2020

import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
    n = int(input())
    a = [*map(int, input().split())]
    am  = max(a)
    c1 = sum(i != am for i in a)
    if c1 == 0:
        print(-1)
    else:
        if a[0] == am and a[1] != am:
            print(1)
        elif a[-1] == am and a[-2] != am:
            print(n)
        else:
            for i in range(1, n - 1):
                if a[i] == am and (a[i-1] != am or a[i+1] != am):
                    print(i+1)
                    break