
#include<iostream>
#include<bits/stdc++.h>
#define m_p make_pair
#define fi first
#define se second
#define pb push_back
#define pi pair<ll, ll> 
typedef long long ll;
typedef long double ld;
#define f(i,n) for(ll i=0;i<n;i++)
#define f1(i,n) for(ll i=1;i<=n;i++)
#define   crap ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0)
using namespace std;
#define INF 1000000
#define vll vector<ll>
const int M = 1e9+7;
#define all(x) (x).begin(), (x).end()
//cout << fixed << setprecision(20);
// priority_queue <pair<ll,pi> , vector< pair<ll,pi> >, greater< pair<ll,pi> > > q;
// v.resize( unique(all(v)) -v.begin() );
ll fastpower(ll x,ll n){ 
  if(n==0)             return 1;
    else if(n%2 == 0)   return fastpower((x*x),n/2);          // n is even
    else                return (x*fastpower((x*x),(n-1)/2)); 
 }// n is odd
ll negativepow(ll base, ll expo, ll m) {
  if(m==1) return 0;
    ll ans=1,y=base%m;
    while(expo>0){
        if(expo&1)    ans=((ans)*y)%m;
        y=(y*y)%m;
        if(y<0) y+=m;
        expo=expo>>1;
    }
    if(ans<0){     ans=(m-abs(ans)%m);    return ans;    }
    return ans%m;
}
ll GCD(ll A, ll B) { if(B==0) return A;   else return GCD(B, A % B); }

bool vowl(char c){  return c=='a'||c=='e'||c=='i'||c=='o'||c=='u';}

//ll modInverse(ll A,ll M){   return fastpower(A,M-2,M); }// m should be prime

void sieve(ll N) {
        bool isPrime[N+1];
        for(ll i = 0; i <= N;++i) {
            isPrime[i] = true;
        }
        isPrime[0] = false;
        isPrime[1] = false;
        for(ll i = 2; i * i <= N; ++i) {
             if(isPrime[i] == true) {                    //Mark all the multiples of i as composite numbers
                 for(ll j = i * i; j <= N ;j += i)
                     isPrime[j] = false;
            }
        }
    }
 bool isPrime(ll n){
    if(n<=1)               return 0;
    if(n==2||n==3)         return 1;
    if(n%2==0||n%3==0)     return 0;
    else
    {
        for(ll i=5;i*i<=n;i+=6)    {   if(n%i==0||n%(i+2)==0)    return 0;  }
        return 1;
    }
}
map<ll,ll>factor(ll n){
    map<ll,ll>pm;
    ll i;
    for(i=2;i*i<=n;i++)
    {
        if(n%i==0) 
          {  while(n%i==0)  {   pm[i]++;   n=n/i;   } 
          }
    }
    if(n>1)
        pm[n]++;
    return pm;
}
void printDivisors(ll n) {
    vector<ll> v; 
    for (ll i=1; i<=sqrt(n); i++) {
        if (n%i==0) 
        { 
            if (n/i == i)     v.pb(i); // check if divisors are equal  
            else
            { v.pb(i);     v.push_back(n/i);   } // push the second divisor in the vector  
        } 
    } 
} 

bool sortbysec(const pair<int,int> &a,const pair<int,int> &b) 
 {    return (a.second < b.second); }  //  sort(vect.begin(), vect.end(), sortbysec); 
 
 void print(vll v)  {	for(auto it:v) cout<<it<<" "; cout<<"\n"; }

ll count_one (ll n)// count no of set bits number of 1
    {  ll count=0;  while( n ){ n = n&(n-1);  count++; }    return count;  }

ll sz(string s){ return s.length();}

int main()
{
	crap;
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int t; cin>>t;
    while(t--)
    {
        ll n; cin>>n;
        map<ll,ll> mp;  vll v;
        f(i,n){ll x; cin>>x; mp[x]++; v.pb(x); }
        ll id=-1;
        for(auto x: mp)
        {
        	if(x.se>1) continue;
        	else
        	{
        		id=x.fi; break;
        	}
        }	
        if(id==-1 ) {cout<<"-1\n";continue;}
          f(i,n) if(v[i]==id ) {cout<<i+1<<"\n"; break;}

    }
   
	return 0;
}


### Prompt

Your challenge is to write a Cpp solution to the following problem:

There is a game called "Unique Bid Auction". You can read more about it here: https://en.wikipedia.org/wiki/Unique_bid_auction (though you don't have to do it to solve this problem).

Let's simplify this game a bit. Formally, there are n participants, the i-th participant chose the number a_i. The winner of the game is such a participant that the number he chose is unique (i. e. nobody else chose this number except him) and is minimal (i. e. among all unique values of a the minimum one is the winning one).

Your task is to find the index of the participant who won the game (or -1 if there is no winner). Indexing is 1-based, i. e. the participants are numbered from 1 to n.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 2 ⋅ 10^4) — the number of test cases. Then t test cases follow.

The first line of the test case contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of participants. The second line of the test case contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ n), where a_i is the i-th participant chosen number.

It is guaranteed that the sum of n does not exceed 2 ⋅ 10^5 (∑ n ≤ 2 ⋅ 10^5).

Output

For each test case, print the answer — the index of the participant who won the game (or -1 if there is no winner). Note that the answer is always unique.

Example

Input


6
2
1 1
3
2 1 3
4
2 2 2 3
1
1
5
2 3 2 4 2
6
1 1 5 5 4 4


Output


-1
2
4
1
2
-1

### Response

```cpp

#include<iostream>
#include<bits/stdc++.h>
#define m_p make_pair
#define fi first
#define se second
#define pb push_back
#define pi pair<ll, ll> 
typedef long long ll;
typedef long double ld;
#define f(i,n) for(ll i=0;i<n;i++)
#define f1(i,n) for(ll i=1;i<=n;i++)
#define   crap ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0)
using namespace std;
#define INF 1000000
#define vll vector<ll>
const int M = 1e9+7;
#define all(x) (x).begin(), (x).end()
//cout << fixed << setprecision(20);
// priority_queue <pair<ll,pi> , vector< pair<ll,pi> >, greater< pair<ll,pi> > > q;
// v.resize( unique(all(v)) -v.begin() );
ll fastpower(ll x,ll n){ 
  if(n==0)             return 1;
    else if(n%2 == 0)   return fastpower((x*x),n/2);          // n is even
    else                return (x*fastpower((x*x),(n-1)/2)); 
 }// n is odd
ll negativepow(ll base, ll expo, ll m) {
  if(m==1) return 0;
    ll ans=1,y=base%m;
    while(expo>0){
        if(expo&1)    ans=((ans)*y)%m;
        y=(y*y)%m;
        if(y<0) y+=m;
        expo=expo>>1;
    }
    if(ans<0){     ans=(m-abs(ans)%m);    return ans;    }
    return ans%m;
}
ll GCD(ll A, ll B) { if(B==0) return A;   else return GCD(B, A % B); }

bool vowl(char c){  return c=='a'||c=='e'||c=='i'||c=='o'||c=='u';}

//ll modInverse(ll A,ll M){   return fastpower(A,M-2,M); }// m should be prime

void sieve(ll N) {
        bool isPrime[N+1];
        for(ll i = 0; i <= N;++i) {
            isPrime[i] = true;
        }
        isPrime[0] = false;
        isPrime[1] = false;
        for(ll i = 2; i * i <= N; ++i) {
             if(isPrime[i] == true) {                    //Mark all the multiples of i as composite numbers
                 for(ll j = i * i; j <= N ;j += i)
                     isPrime[j] = false;
            }
        }
    }
 bool isPrime(ll n){
    if(n<=1)               return 0;
    if(n==2||n==3)         return 1;
    if(n%2==0||n%3==0)     return 0;
    else
    {
        for(ll i=5;i*i<=n;i+=6)    {   if(n%i==0||n%(i+2)==0)    return 0;  }
        return 1;
    }
}
map<ll,ll>factor(ll n){
    map<ll,ll>pm;
    ll i;
    for(i=2;i*i<=n;i++)
    {
        if(n%i==0) 
          {  while(n%i==0)  {   pm[i]++;   n=n/i;   } 
          }
    }
    if(n>1)
        pm[n]++;
    return pm;
}
void printDivisors(ll n) {
    vector<ll> v; 
    for (ll i=1; i<=sqrt(n); i++) {
        if (n%i==0) 
        { 
            if (n/i == i)     v.pb(i); // check if divisors are equal  
            else
            { v.pb(i);     v.push_back(n/i);   } // push the second divisor in the vector  
        } 
    } 
} 

bool sortbysec(const pair<int,int> &a,const pair<int,int> &b) 
 {    return (a.second < b.second); }  //  sort(vect.begin(), vect.end(), sortbysec); 
 
 void print(vll v)  {	for(auto it:v) cout<<it<<" "; cout<<"\n"; }

ll count_one (ll n)// count no of set bits number of 1
    {  ll count=0;  while( n ){ n = n&(n-1);  count++; }    return count;  }

ll sz(string s){ return s.length();}

int main()
{
	crap;
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int t; cin>>t;
    while(t--)
    {
        ll n; cin>>n;
        map<ll,ll> mp;  vll v;
        f(i,n){ll x; cin>>x; mp[x]++; v.pb(x); }
        ll id=-1;
        for(auto x: mp)
        {
        	if(x.se>1) continue;
        	else
        	{
        		id=x.fi; break;
        	}
        }	
        if(id==-1 ) {cout<<"-1\n";continue;}
          f(i,n) if(v[i]==id ) {cout<<i+1<<"\n"; break;}

    }
   
	return 0;
}


```