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

T = int (input ())

for I in range (0, T):

    N = int (input ())
    X = list (map (int, input ().split (' ')))
    Y = max (X)
    C = True

    for A, B in enumerate (X):

        if B == Y:

            if A == 0 and A == len (X) - 1:

                print (A + 1)
                C = False
                
                break

            elif A == 0 and A != len (X) - 1:

                if B != X [A + 1]:

                    print (A + 1)
                    C = False
                
                    break

            elif A != 0 and A == len (X) - 1:

                if B != X [A - 1]:

                    print (A + 1)
                    C = False
                
                    break

            elif B != X [A + 1] or B != X [A - 1]:

                print (A + 1)
                C = False
                
                break

    if C:

        print (- 1)
