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

# for _ in range(int(input())):
# a, b, c, d = map(int, input().split())
# if(abs(d-b) == 0 or abs(c-a) == 0):
#     print(abs(d-b)+abs(c-a))
# else:
#     print(abs(d-b)+abs(c-a) + 2)

#a = input()
# while("BB" in a or "AB" in a):
#     if('AB' in a):
#         a = a.replace("AB", "", 1)
#     elif("BB" in a):
#         a = a.replace("BB", "", 1)
# c = 0
# for i in a:
#     if(c != 0 and i == 'B'):
#         c -= 1
#     else:
#         c += 1
# print(c)

# n = int(input())
# a = input()
# b = a[0]+a[-1]
# a1 = a.count('<>') + b.count("<>")
# a2 = a.count("><") + b.count("><")
# print(n-(a1+a2))
# c = 0
# for i in range(n-1):
#     if(a[i:i+2] in ["<>", ">>", "<<", "><"]):
#         c += 1
# if(b in ["<>", ">>", "<<", "><"]):
#     c += 1
# if(n-c == 0):
#     if(a == "<"*n or a == ">"*n):
#         print(n)
#     else:
#         print(0)
# else:
#     print(n-c)

# n = 7
# a = [[0] * n for _ in range(n)]
# for i in range(n-1):
#     l, m = map(int, input().split())
#     a[l-1][m-1] = 1
# for i in range(n):
#     print(a[i])

for _ in range(int(input())):
    a = int(input())
    # c = 0
    # flag = 0
    # d = ''
    # for i in range(1, 10):
    #     for j in range(1, 5):
    #         d = str(i)*j
    #         c += len(d)
    #         if(int(d) == a):
    #             print(c)
    #             break

    ar = list(map(int, input().split()))
    # ze = 0
    # on = 0
    # zet = 0
    # for i in ar:
    #     if(i == 0 and on != 0):
    #         ze += 1
    #     elif(i == 1):
    #         on += 1
    # for j in range(1,a+1):
    #     if(ar[a-j] == 1):
    #         break
    #     zet += 1
    # print(ze - zet)

    flag = 0
    m = max(ar)
    mi = min(ar)
    if(m == mi):
        print(-1)
    else:
        for i in range(1, a-1):
            if(ar[i] == m and (ar[i-1] < m or ar[i+1] < m)):
                flag = 1
                print(i+1)
                break
        if(flag == 0):
            if(m == ar[0]):
                print(1)
            else:
                print(a)
