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

import sys, collections

tc = int(sys.stdin.readline())
for _ in range(tc):
    n = int(sys.stdin.readline())
    arr = list(map(int, sys.stdin.readline().split()))
    flag = max(arr)
    find = False
    for i in range(n):
        temp = arr[i]
        if i == 0:
            if temp > arr[i + 1]:
                temp += 1
                if temp > flag:
                    print(i + 1)
                    find = True
                    break
        elif i == n - 1:
            if temp > arr[i - 1]:
                temp += 1
                if temp > flag:
                    print(i + 1)
                    find = True
                    break
        else:
            if temp > arr[i - 1]:
                temp += 1
            if temp > arr[i + 1]:
                temp += 1
            if temp > flag:
                print(i + 1)
                find = True
                break

    if not find:
        print(-1)