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
from functools import reduce
from bisect import bisect_right
from bisect import bisect_left
import copy
import atexit, io, sys
def main():
    buffer = io.BytesIO() 
    sys.stdout = buffer

    @atexit.register 
    def write(): 
        sys.__stdout__.write(buffer.getvalue())
    for _ in xrange(input()):
        n=input()
        d=defaultdict(int)
        l=map(int,raw_input().split())
        if l.count(max(l))==n:
            print -1
        else:
            loc=max(l)
            l.append(-1)
            l.insert(0,(10**9)+1)
            for i in range(1,n+1):
                if (l[i]==loc and l[i+1]<loc) or (l[i]==loc and l[i-1]<loc):
                    print(i)
                    break


if __name__ == '__main__':
    main()