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 defaultdict, Counter, deque
# from heapq import heappop, heappush, heapify
# from functools import lru_cache, reduce
# import bisect
# from itertools import permutations, combinations, combinations_with_replacement


t = int(input())
arr = []
for _ in range(t):
    n = int(input())
    arr.append( list(map(int, input().split())) )

# O(nlogn)
for nums in arr:
    if [nums[0]]*len(nums) == nums:
        print(-1)
        continue
    #print([nums[0]]*len(nums), nums)
    j = max(nums)
    for i in range(len(nums)):
        if nums[i] == j and ((i+1 < len(nums) and nums[i+1] < j) or (i-1 >= 0 and nums[i-1] < j)):
            print(i+1)
            break


# Test cases
'''
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

'''
