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

def main_func(x:str):
    entries = list(map(int, x.split()))
    for i in range(len(entries)):
        if recursion(entries.copy(), i):
            return i+1
    else:
        return -1


def recursion(li, index):
    if len(li) == 1:
        return True
    if index + 1 < len(li):
        if li[index] > li[index+1]:
            li.pop(index + 1)
            li[index] += 1
            if recursion(li, index):
                return True
    if index - 1 > -1:
        if li[index] > li[index-1]:
            li.pop(index - 1)
            index = index - 1
            li[index] += 1
            if recursion(li, index):
                return True
    return False


def test_func1(x:str):
    entries = list(map(int, x.split()))
    max_el = max(entries)
    for i in range(len(entries)):
        if entries[i] == max_el:
            if i>0:
                if entries[i-1]<max_el:
                    return  i+1
            if i<len(entries)-1:
                if entries[i+1]<max_el:
                    return i + 1
    else:
        return -1


t = input()
r = ''
for i in range(int(t)):
    r = input()
    l = input()
    print(test_func1(l))