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 collections import deque
from collections import Counter
from itertools import permutations
import heapq

def counterExample():
    arr = [1, 3, 4, 1, 2, 1, 1, 3, 4, 3, 5, 1, 2, 5, 3, 4, 5]
    counter = Counter(arr)
    top_three = counter.most_common(3)
    print(top_three)

q = deque()

#For stack we have:
#q.append()
#q.pop()

#For queue we have:
#q.append()
#q.popleft()


#for heap we have:
#heapify(a list)
#heapq.heappush()
#heapq.heappop()
#heapq.nlargest(k, iterable, key = fun)
#heapq.nsmallest(k, iterable, key = fun)

import math
def main():
    t = int(input())
    while t >= 1:
        t -= 1
        n = int(input())
        l = [int(i) for i in input().split()]
        maxi = max(l)
        ok = 0
        for poz, i in enumerate(l, 0):
            if i != maxi:
                if (poz - 1 >= 0) and l[poz - 1] == maxi:
                    print(poz - 1 + 1)
                    ok = 1
                    break
                elif (poz + 1 < len(l)) and l[poz + 1] == maxi:
                    print(poz + 1 + 1)
                    ok = 1
                    break
        if ok == 0:
            print(-1)










if __name__ == "__main__":
    main()