#include<bits/stdc++.h>
using namespace std;
void solve()
{
	int n;
	int a[210] = {0};
	int b[210] = {0};
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int t;
		cin >> t;
		a[t]++;
		b[t] = i+1;
	}
	for (int i = 1; i <= 100; i++)
		if (a[i] == 1)
			cout << b[i]<<"\n";
}
int main()
{
	ios::sync_with_stdio(false);
	int t;
	cin >> t;
	while (t--)
	{
		solve();
	}
	//system("pause");
	return 0;
}