#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
 
#define ll long long 
#define ld long double
 #define mod 1000000007
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define repb(i,a,b) for(ll i=a;i>=b;i--)
 
 #define vc(v,ll,n) vector<ll> v(n)
#define pb push_back 
#define pob pop_back 

#define all(A)  A.begin(),A.end()
#define allr(A)    A.rbegin(),A.rend()
#define sumv(a) accumulate(all(a),0)
#define mp make_pair 
 
#define t() int test;cin>>test;while(test--)
 
#define que_max priority_queue <int>
#define ii pair<ll int,ll int>
#define f first
#define s second
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#define endl "\n"
int faltu=0;
int che=1;
int count(ll int n)
{
    if(n==0)
    return faltu;
    int j=n%10;
    if(j==0||j==1)
    ;
    else
    che=0;
    n/=10;
    faltu++;
   return count(n);
    
}
/*void sert (vector<int>&v,int last)// sorting a vector using recursion
{
    if(v.size()==0||v[v.size()-1]<=last)
    {
        v.pb(last);
        return ;
    }
    int temp=v[v.size()-1];
    v.pop_back();
    sert(v,last);
    v.pb(temp);
    
}
void insort(vector<int>&v)
{
    if(v.size()==1)
    return;
    int last=v[v.size()-1];
    v.pop_back();
    insort(v);
    sert(v,last);
    
    
}*/

/*void sert (stack<int>&v,int last)//// sorting a stack using recursion
{
    if(v.size()==0||v.top()>=last)
    {
        v.push(last);
        return ;
    }
    int temp=v.top();
    v.pop();
    sert(v,last);
    v.push(temp);
    
}
void insort(stack<int>&v)
{
    if(v.size()==1)
    return;
    int last=v.top();
    v.pop();
    insort(v);
    sert(v,last);
    
    
}*/

/*
int flag=0;
void     deleteelementfromstack(stack<int>&v,int ele)// deleting element from stack and printing them
{
    if(v.size()==0)
    {
        if(flag==0)
        cout<<"element not found"<<endl;
        
        return ;
    }
    else if( v.top()==ele)
    {
        flag=1;
        v.pop();
        
    }
    int temp=v.top();
    v.pop();
     deleteelementfromstack(v,ele);
     cout<<temp<<" ";
     v.push(temp);
}*/
/*
///this is a kth element in grammer
int solv(int n,int k,int rem)
{
    if(n==0)
    {
        if(rem==0)
        return 0;
        else return 1;
    }
     
    int ans=solv(n-1,(k+1)/2,(k)%2);
    if((ans==0&&rem==0)||(ans==1&&rem==1))
    return 1;
    else
    return 0;
}*/

int N=1e5;
vector<bool>prime( N+1,true);
vector<int>prim;

void pri()
{
    
    
    for(int i=2;i*i<=N;i++)
    {
        if(prime[i])
        {
            
            for(int j=i*i;j<=N;j+=i)
            {
                prime[j]=false;
            }
        }
    }
    
    for(int i=2;i<=N;i++)
    {
        if(prime[i])
        prim.pb(i);
    }
    return ;
}
ll int dp[200002];
void fact(){                                    //factorial of a very big number
    dp[0]=1;
    for(int i=1; i<200002; i++){
        dp[i] = (dp[i-1]*i)%mod;
    }
}
ll int moduleinverse(ll int x){                         // modulo inverse of mod of 1e9+7
   ll int res=1;
     ll int  y = mod-2;
   x = x%mod;
     while(y>0){
         if(y&1) res = (res*x)%mod;
         y/=2;
         x = (x*x)%mod;
     }
     return res;
 }
 
 bool chec( int n,int k)       //check whether k is present or not
 {
     while(n)
     {
         if(n%10==k)
         return true;
         n=n/10;
     }
     return false;
 }

 ll int loga( ll int a,ll  int k)   //log a base k 
 {
     ll int ans=0;
     while(a>=k)
     {
         ans++;
         a/=k;
     }
     return ans;
 }
 
ll int modpow(ll int x,ll int n)                //to get n pow of x if y is very big
{
    if(n==0)return 1;
    ll int a=modpow(x,n/2);
    a=(a*a)%mod;
    if(n%2==1)a=(a*x)%mod;
    return a;
}
/*
void solve()
{
 string s;
 cin>>s;
 int n=s.length();
 map<char,int>m;
 set<char>ss;
 vector<int>v(n,0);
 rep(i,0,n)
 {
     m[s[i]]++;
     ss.insert(s[i]);
 }
 int ans=ss.size();
 vector<int>vv;
rep(i,0,n)
{
    if(m[s[i]]==1)
    {
    vv.pb(i);
    m[s[i]]=0;
}}
int prev=0;

rep(i,0,vv.size())
{
    char tr=s[vv[i]];
    v[vv[i]]=1;
        
    repb(j,vv[i]-1,prev)
    {
        if(s[j]-tr>0&&m[s[j]]>0)
        {
            m[s[j]]=0;
            v[j]=1;
            tr=s[j];
            
        }
        else if(s[j]-tr<0&&m[s[j]]>0)
        {
            m[s[j]]--;
        }
    }
    prev=vv[i];
}
repb(i,n-1,0)
{
    if(m[s[i]]>1)
    v[i]=1,m[s[i]]=0;
}
rep(i,0,n)
{
    if(v[i]==1)
    ss.erase(s[i]);
}


repb(i,n-1,0)
{
    if(ss.find(s[i])!=ss.end())
    {
        v[i]=1;
        ss.erase(s[i]);
    }
}
for(auto it:ss)
{
    
    repb(j,n)
    
}

rep(i,0,n)
{
    if(v[i]==1)
    cout<<s[i];
}
cout<<endl;

    





 
}
*/


/*
void solve()
{
   
  int n,w;
  cin>>n>>w;
  int a[n];
  rep(i,0,n)
  cin>>a[i];
  bitset<32>s(w);
  int ass[32]{0};
  repb(i,31,0 )
{
    if(s[i]==1)
    {
        ass[i]
    }
}
  int cnt[32];
  rep(j,0,n){
      bitset<32>ss(a[i]);
      
  
  rep(i,0,32)
  {
      if(ss[i]==1)
      cnt[i]++;
  }
  }
  int cnn=0;
  repb(i,31,0)
  {
      
          int ann=0;
      if(s[i]==1)
      {
          ann=1;
          if(cnt[i]>=1)
          {
              cnt[i]-=ann;
              cnn++;
          }
          int j=i;
          
          while(!cnt[j])
          j++;
          
      }
  }
}
*/
/*
void solve( )
{
  
  int n;
  cin>>n;
  int a[n];
  rep(i,0,n)
  cin>>a[i];
  sort(a,a+n);
  int nn=(n+1)/2-1;
  int b[n*2+2]{0};
  int j=0;
  rep(i,nn,n)
  {
      b[j++]=a[i];
      j++;
  }
  j=0;
  int cnt=0;
  if(n!=1)
  {
  while(j<n&&!(b[j]>a[0]))
  {
      j+=2;
  }
  
int k=j+1;
  rep(i,0,nn)
  {
      b[k]=a[i];
      k+=2;
  }}
  
  vector<int>v;
  rep(i,0,2*n)
  {
      if(b[i])
      v.pb(b[i]);
  }
  rep(i,1,n-1)
  {
      if(v[i]<v[i+1]&&v[i]<v[i-1])
      cnt++;
  }
 cout<<cnt<<endl;
  rep(i,0,v.size())
  if(v[i])
  cout<<v[i]<<" ";
  cout<<endl;
  
}


*//*
ll int dp[2003][2003];

   vector<pair<ll int,ll int>>v;
   ll int calc(int x,int y,int n)
   {
       if(dp[x][y]!=-1)
       {
           return dp[x][y];
       }
       if(x==y)
       {
           ll int aa=abs((v[x].f-v[n].f))*v[n].s;
           ll int bb=abs((v[x].f-v[n].f))*v[x].s;
       dp[x][y]=min(aa,bb);
       return dp[x][y];
           
       }
        ll int aa=abs((v[x].f-v[n].f))*v[n].s;
           ll int bb=abs((v[x].f-v[n].f))*v[x].s;
           if(aa>bb)
           {
               
           }
       dp[x][y-1]=calc(x,y-1,n)
       dp[x+1][y]
       
       
   }


void solve()

{
   ll int n;
   cin>>n;
   ll int s[n];
   set<ll int>ss;
   map<ll int,ll int >m;
   rep(i,0,n)
   {
       cin>>s[i];
       m[s[i]]++;
   ss.insert(s[i]);
       
   }
   for(auto it:ss)
   {
       ll int av=it;
       cout<<av<<
       " ";
       v.pb({av,m[av]});
   }
   ll int maxa=0;
   
   rep(i,0,2003)
   {
       rep(j,0,2003)
       {
           dp[i][j]=-1;
       }
   }
   maxa=calc(0,v.size()-2,v.size()-1);
   rep(i,0,2003)
   {
       rep(j,0,2003)
       {
           dp[i][j]=-1;
       }
   }
   maxa=min(calc(1,v.size()-1,0),maxa);
    
    cout<<maxa<<endl;
}


void solve()
{
    
    
ll     int n;
    cin>>n;
    ll int cnt=0;
    ll int sum=0;
    ll int a[n];
    rep(i,0,n)
{
    cin>>a[i];
}
map<ll int ,ll int>m;
    set<ll int>s;
    s.insert((-1*a[0]));
    m[(-1*a[0])]=1;
    rep(i,1,n)
    {
        if(s.find(a[i])==s.end())
        {
            
        }
    }
    
}
*/


void solve()
{
 
   
   
   
   
   int n;
   cin>>n;
   int cnt=0;
   int a[n];
   map<int,int>m;
   rep(i,0,n)
   {
       cin>>a[i];
       m[a[i]]++;
   }
   rep(i,0,n)
   {
       if(m[a[i]]==1)
      { cout<<i+1<<endl;
      return;}
   }
   
   
}
int main()
   {
    //  cout<<fixed<<setprecision(16)<<sum<<endl;   for set precision of given number
    
// freopen("input.txt", "r", stdin);
 //  freopen("output.txt", "w", stdout);
IOS
    t()
{
    solve();
}
       
   }
### Prompt

Construct a cpp code solution to the problem outlined:

You are given an array a consisting of n (n ≥ 3) positive integers. It is known that in this array, all the numbers except one are the same (for example, in the array [4, 11, 4, 4] all numbers except one are equal to 4).

Print the index of the element that does not equal others. The numbers in the array are numbered from one.

Input

The first line contains a single integer t (1 ≤ t ≤ 100). Then t test cases follow.

The first line of each test case contains a single integer n (3 ≤ n ≤ 100) — the length of the array a.

The second line of each test case contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 100).

It is guaranteed that all the numbers except one in the a array are the same.

Output

For each test case, output a single integer — the index of the element that is not equal to others.

Example

Input


4
4
11 13 11 11
5
1 4 4 4 4
10
3 3 3 3 10 3 3 3 3 3
3
20 20 10


Output


2
1
5
3

### Response

```cpp
#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
 
#define ll long long 
#define ld long double
 #define mod 1000000007
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define repb(i,a,b) for(ll i=a;i>=b;i--)
 
 #define vc(v,ll,n) vector<ll> v(n)
#define pb push_back 
#define pob pop_back 

#define all(A)  A.begin(),A.end()
#define allr(A)    A.rbegin(),A.rend()
#define sumv(a) accumulate(all(a),0)
#define mp make_pair 
 
#define t() int test;cin>>test;while(test--)
 
#define que_max priority_queue <int>
#define ii pair<ll int,ll int>
#define f first
#define s second
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#define endl "\n"
int faltu=0;
int che=1;
int count(ll int n)
{
    if(n==0)
    return faltu;
    int j=n%10;
    if(j==0||j==1)
    ;
    else
    che=0;
    n/=10;
    faltu++;
   return count(n);
    
}
/*void sert (vector<int>&v,int last)// sorting a vector using recursion
{
    if(v.size()==0||v[v.size()-1]<=last)
    {
        v.pb(last);
        return ;
    }
    int temp=v[v.size()-1];
    v.pop_back();
    sert(v,last);
    v.pb(temp);
    
}
void insort(vector<int>&v)
{
    if(v.size()==1)
    return;
    int last=v[v.size()-1];
    v.pop_back();
    insort(v);
    sert(v,last);
    
    
}*/

/*void sert (stack<int>&v,int last)//// sorting a stack using recursion
{
    if(v.size()==0||v.top()>=last)
    {
        v.push(last);
        return ;
    }
    int temp=v.top();
    v.pop();
    sert(v,last);
    v.push(temp);
    
}
void insort(stack<int>&v)
{
    if(v.size()==1)
    return;
    int last=v.top();
    v.pop();
    insort(v);
    sert(v,last);
    
    
}*/

/*
int flag=0;
void     deleteelementfromstack(stack<int>&v,int ele)// deleting element from stack and printing them
{
    if(v.size()==0)
    {
        if(flag==0)
        cout<<"element not found"<<endl;
        
        return ;
    }
    else if( v.top()==ele)
    {
        flag=1;
        v.pop();
        
    }
    int temp=v.top();
    v.pop();
     deleteelementfromstack(v,ele);
     cout<<temp<<" ";
     v.push(temp);
}*/
/*
///this is a kth element in grammer
int solv(int n,int k,int rem)
{
    if(n==0)
    {
        if(rem==0)
        return 0;
        else return 1;
    }
     
    int ans=solv(n-1,(k+1)/2,(k)%2);
    if((ans==0&&rem==0)||(ans==1&&rem==1))
    return 1;
    else
    return 0;
}*/

int N=1e5;
vector<bool>prime( N+1,true);
vector<int>prim;

void pri()
{
    
    
    for(int i=2;i*i<=N;i++)
    {
        if(prime[i])
        {
            
            for(int j=i*i;j<=N;j+=i)
            {
                prime[j]=false;
            }
        }
    }
    
    for(int i=2;i<=N;i++)
    {
        if(prime[i])
        prim.pb(i);
    }
    return ;
}
ll int dp[200002];
void fact(){                                    //factorial of a very big number
    dp[0]=1;
    for(int i=1; i<200002; i++){
        dp[i] = (dp[i-1]*i)%mod;
    }
}
ll int moduleinverse(ll int x){                         // modulo inverse of mod of 1e9+7
   ll int res=1;
     ll int  y = mod-2;
   x = x%mod;
     while(y>0){
         if(y&1) res = (res*x)%mod;
         y/=2;
         x = (x*x)%mod;
     }
     return res;
 }
 
 bool chec( int n,int k)       //check whether k is present or not
 {
     while(n)
     {
         if(n%10==k)
         return true;
         n=n/10;
     }
     return false;
 }

 ll int loga( ll int a,ll  int k)   //log a base k 
 {
     ll int ans=0;
     while(a>=k)
     {
         ans++;
         a/=k;
     }
     return ans;
 }
 
ll int modpow(ll int x,ll int n)                //to get n pow of x if y is very big
{
    if(n==0)return 1;
    ll int a=modpow(x,n/2);
    a=(a*a)%mod;
    if(n%2==1)a=(a*x)%mod;
    return a;
}
/*
void solve()
{
 string s;
 cin>>s;
 int n=s.length();
 map<char,int>m;
 set<char>ss;
 vector<int>v(n,0);
 rep(i,0,n)
 {
     m[s[i]]++;
     ss.insert(s[i]);
 }
 int ans=ss.size();
 vector<int>vv;
rep(i,0,n)
{
    if(m[s[i]]==1)
    {
    vv.pb(i);
    m[s[i]]=0;
}}
int prev=0;

rep(i,0,vv.size())
{
    char tr=s[vv[i]];
    v[vv[i]]=1;
        
    repb(j,vv[i]-1,prev)
    {
        if(s[j]-tr>0&&m[s[j]]>0)
        {
            m[s[j]]=0;
            v[j]=1;
            tr=s[j];
            
        }
        else if(s[j]-tr<0&&m[s[j]]>0)
        {
            m[s[j]]--;
        }
    }
    prev=vv[i];
}
repb(i,n-1,0)
{
    if(m[s[i]]>1)
    v[i]=1,m[s[i]]=0;
}
rep(i,0,n)
{
    if(v[i]==1)
    ss.erase(s[i]);
}


repb(i,n-1,0)
{
    if(ss.find(s[i])!=ss.end())
    {
        v[i]=1;
        ss.erase(s[i]);
    }
}
for(auto it:ss)
{
    
    repb(j,n)
    
}

rep(i,0,n)
{
    if(v[i]==1)
    cout<<s[i];
}
cout<<endl;

    





 
}
*/


/*
void solve()
{
   
  int n,w;
  cin>>n>>w;
  int a[n];
  rep(i,0,n)
  cin>>a[i];
  bitset<32>s(w);
  int ass[32]{0};
  repb(i,31,0 )
{
    if(s[i]==1)
    {
        ass[i]
    }
}
  int cnt[32];
  rep(j,0,n){
      bitset<32>ss(a[i]);
      
  
  rep(i,0,32)
  {
      if(ss[i]==1)
      cnt[i]++;
  }
  }
  int cnn=0;
  repb(i,31,0)
  {
      
          int ann=0;
      if(s[i]==1)
      {
          ann=1;
          if(cnt[i]>=1)
          {
              cnt[i]-=ann;
              cnn++;
          }
          int j=i;
          
          while(!cnt[j])
          j++;
          
      }
  }
}
*/
/*
void solve( )
{
  
  int n;
  cin>>n;
  int a[n];
  rep(i,0,n)
  cin>>a[i];
  sort(a,a+n);
  int nn=(n+1)/2-1;
  int b[n*2+2]{0};
  int j=0;
  rep(i,nn,n)
  {
      b[j++]=a[i];
      j++;
  }
  j=0;
  int cnt=0;
  if(n!=1)
  {
  while(j<n&&!(b[j]>a[0]))
  {
      j+=2;
  }
  
int k=j+1;
  rep(i,0,nn)
  {
      b[k]=a[i];
      k+=2;
  }}
  
  vector<int>v;
  rep(i,0,2*n)
  {
      if(b[i])
      v.pb(b[i]);
  }
  rep(i,1,n-1)
  {
      if(v[i]<v[i+1]&&v[i]<v[i-1])
      cnt++;
  }
 cout<<cnt<<endl;
  rep(i,0,v.size())
  if(v[i])
  cout<<v[i]<<" ";
  cout<<endl;
  
}


*//*
ll int dp[2003][2003];

   vector<pair<ll int,ll int>>v;
   ll int calc(int x,int y,int n)
   {
       if(dp[x][y]!=-1)
       {
           return dp[x][y];
       }
       if(x==y)
       {
           ll int aa=abs((v[x].f-v[n].f))*v[n].s;
           ll int bb=abs((v[x].f-v[n].f))*v[x].s;
       dp[x][y]=min(aa,bb);
       return dp[x][y];
           
       }
        ll int aa=abs((v[x].f-v[n].f))*v[n].s;
           ll int bb=abs((v[x].f-v[n].f))*v[x].s;
           if(aa>bb)
           {
               
           }
       dp[x][y-1]=calc(x,y-1,n)
       dp[x+1][y]
       
       
   }


void solve()

{
   ll int n;
   cin>>n;
   ll int s[n];
   set<ll int>ss;
   map<ll int,ll int >m;
   rep(i,0,n)
   {
       cin>>s[i];
       m[s[i]]++;
   ss.insert(s[i]);
       
   }
   for(auto it:ss)
   {
       ll int av=it;
       cout<<av<<
       " ";
       v.pb({av,m[av]});
   }
   ll int maxa=0;
   
   rep(i,0,2003)
   {
       rep(j,0,2003)
       {
           dp[i][j]=-1;
       }
   }
   maxa=calc(0,v.size()-2,v.size()-1);
   rep(i,0,2003)
   {
       rep(j,0,2003)
       {
           dp[i][j]=-1;
       }
   }
   maxa=min(calc(1,v.size()-1,0),maxa);
    
    cout<<maxa<<endl;
}


void solve()
{
    
    
ll     int n;
    cin>>n;
    ll int cnt=0;
    ll int sum=0;
    ll int a[n];
    rep(i,0,n)
{
    cin>>a[i];
}
map<ll int ,ll int>m;
    set<ll int>s;
    s.insert((-1*a[0]));
    m[(-1*a[0])]=1;
    rep(i,1,n)
    {
        if(s.find(a[i])==s.end())
        {
            
        }
    }
    
}
*/


void solve()
{
 
   
   
   
   
   int n;
   cin>>n;
   int cnt=0;
   int a[n];
   map<int,int>m;
   rep(i,0,n)
   {
       cin>>a[i];
       m[a[i]]++;
   }
   rep(i,0,n)
   {
       if(m[a[i]]==1)
      { cout<<i+1<<endl;
      return;}
   }
   
   
}
int main()
   {
    //  cout<<fixed<<setprecision(16)<<sum<<endl;   for set precision of given number
    
// freopen("input.txt", "r", stdin);
 //  freopen("output.txt", "w", stdout);
IOS
    t()
{
    solve();
}
       
   }
```