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

"""
- math -
from math import factorial
from math import gcd
from math import pi
large_p = 10**9 + 7
from itertools import accumulate # 累積和
from operator import mul
- other -
from collections import Counter
from itertools import combinations
from itertools import combinations_with_replacement
from itertools import permutations
from operator import itemgetter
from functools import reduce
- list -
from copy import deepcopy
from collections import deque
from heapq import heapify, heappop, heappush
- output -
p2d = lambda x: print(*x, sep="\n")
p2line = lambda x: print(*x, sep=" ")
print(*list1, sep="\n")
- input -
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
= map(int, input().split())
= [tuple(map(int, input().split())) for _ in range(n)]
= [tuple(map(int, readline().split())) for _ in range(n)]
m = map(int, read().split()) /ab = zip(m, m) /for a, b in ab:
ps = [line.split() for line in readlines()] # inputの最後まで読んでしまうので注意。
n, *a = map(int, read().split())
a = tuple(map(int, read().split())) # 1行１文字などの入力に。
a = list(map(int, readlines()))
a = np.array(read().split(), np.int32) # int。全入力をread。
a = np.array(list(read().rstrip())) #文字
a = np.array(readline().split(), np.int64) #int。１行read。
- run -
sys.setrecursionlimit(10**6)
from time import sleep
from numba import njit
import numpy as np
@njit('(i4[::1],)', cache=True)
"""
# ATC03


import sys
read = sys.stdin.read
def  main():
    t = int(input())
    for _ in range(t):
        n = int(input())
        a = tuple(map(int, input().split()))
        if max(a) == min(a):
            print(-1)
        else:
            ma = max(a)
            mai = [i for i, v in enumerate(a) if v == ma]
            for maie in mai:
                if maie == 0:
                    if a[1] != ma:
                        print(1)
                        break
                elif maie == n - 1:
                    if a[-2] != ma:
                        print(n)
                        break
                else:
                    if a[maie-1] != ma or a[maie+1] != ma:
                        print(maie+1)
                        break

if __name__ == '__main__':
    main()
